Skip to content

How To Remove Index.php From Url In WordPress (Step by Step)

Today, I am focusing on a common issue for WordPress users: removing index.php from your website’s URLs.

This change can significantly enhance your site’s user experience and improve its SEO friendliness.

The Challenge

While working on my clients projects, I noticed that my URLs included index.php.

This issue was apparent in all sections of their sites, including the ‘Contact’ page.

Instead of displaying a clean URL like domain.com/contact, it showed domain.com/index.php/contact, which is not ideal for user experience or SEO.

Remove index.php from URL Step-by-Step Guide:

Step 1: Accessing WordPress Dashboard

Start by logging into your WordPress dashboard. This is your control panel, where you can make all kinds of changes to your site.

Step 2: Navigating to Permalinks Settings

A screenshot of a WordPress dashboard menu highlighting the "Settings" tab, with a red box around the "Permalinks" option, indicating where to access permalink settings.

In the dashboard, look to the left-hand menu. Scroll down until you find the ‘Settings‘ option. Hover over it and click on ‘Permalinks‘.

Step 3: Choosing the Right Permalink Structure

A screenshot of a WordPress permalink settings interface, showing a "Custom Structure" option for URLs. The example provided in the input field is '/index.php/%postname%/'.

You’ll notice the current URL structure that includes .php.

To remove this, simply alter the settings. Choosing ‘Post name’ as your permalink structure is generally a good practice, as it keeps URLs simple and SEO-friendly.

However, you’re free to select any structure that suits your needs.

A screenshot of various WordPress permalink settings with options such as "Plain," "Day and name," "Month and name," and more. A red box highlights the "Post name" option, and an arrow points to the example URL

Step 4: Saving the Changes

After selecting ‘Post name’, scroll down and click on ‘Save Changes’. This step is crucial to ensure your changes are applied.

Step 5: Verifying the Changes

To check if the removal was successful, go to ‘Pages’ and view all pages. Open any page, like the ‘Contact’ page, and observe the URL. The index.php should now be removed, making your URLs cleaner and more professional-looking.

Conclusion

Removing index.php from your WordPress URLs is a simple yet effective way to make your site more accessible and search-engine friendly. It’s a small change that can have a significant impact on your website’s performance and user experience.

Share the article on social media (all links open in a new tab)

Pinterest

If you enjoyed this article then please follow us on Twitter or Facebook.
You can also check out Salzburg, our modern personal blog theme that really makes a difference if you are serious about blogging.