Remove index.php wordpress


How can i remove index.php from wordpress URL.??


Do you mean that it is in your Wordpress Template? Or do you mean you don’t want it in your server?
Either way, delete it… If it is in your template, you need to locate it there. If on your server, just delete it.

Not really sure what you are asking…


i set up wordpress in my localhost .
and when i am accessing any pages from front-end side , “index.php” shows in url…
i tried to change permalink setting and .htaccess too .

This is the code :–

permalink :-

  1. custom structure :- http://localhost/wordpress/index.php/%postname%

BEGIN WordPress

RewriteEngine On RewriteBase /wordpress/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wordpress/index.php [L]

END WordPress


Well, as far as I know, this should work…

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]

BUT, You can’t do it under Wordpress… This code will remove the index.php
If you need to also remove the wordpress part, just change the last line with /wordpress/index.php…


The permalinks options writes to the htaccess file. Does Wordpress have write permissions on that file?



Yes permission is set to write .htaccess file.
still not site not working without index.php in url.