Remove index.php from Wordpress permalink URL

by Ecommerce success

Sometimes when setting up your website on Wordpress, you’re stuck with an ugly index.php in the url. No matter where you look, sometimes it can be tricky removing it.

Here are a few steps to make sure that the index.php disapears.

NOTE: Make sure you screenshot your current Permalink settings to have a backup in case you end up breaking your website – this way you don’t have to panic!

Select the correct Permalink Structure in Wordpress

In your Wordpress admin dashboard, go to Settings and then Permalinks and select the radio button for the type of url you want. We highly recommend to go with one that includes the post name as it will greatly help with your Search engine optimisation (SEO) – Click Save Changes.

Check that your server has mod_rewrite enabled

Create a php file on your server root, and place the following code inside it and click save.

<?php echo phpinfo(); ?>

Open the file in a browser and search for the text mod_rewrite. Check that it is located in a section called loaded modules.

Check Apache config settings

Apache config settings can also be causing the problem. On your linux server, navigate to /etc/apache2 and edit the apache2.conf file.

Scroll through the file until you find the Directory settings, and make sure <Directory /> and <Directory /var/www/> both have AllowOverride All. Then restart your apache server (service apache2 restart)

Following these steps should hopefully clear up your url to be both presentable and SEO friendly!

Let us know in the comments how it went.

Related Posts

Leave a Comment