testing21039bool(false)

How to Remove index.php from URL in WordPress

How to Remove index.php from URL in WordPress ( Thumbnil & Banner - 350_185 )

You are not alone if you regularly observe the frustrating index.php issue on your WordPress website. Unfortunately, it does not look devastating initially, but it may hamper your SEO (Search Engine Optimization) and URL structure in the long run.

As you know, user-friendly URLs are vital for offering an engaging user experience and better organic results.

This blog post will help you understand how to remove index.php from WordPress URLs.

How to Remove index.php from WordPress URls?

Two influential methods, manual setting of permalink structure and updating the .htaccess file, can help you completely remove the index.php WordPress issue from URLs.

Both these methods are described below:

1. Remove index.php WordPress Issue from URLs through Permalink Structure Manual Setting

To get rid of the index.php WordPress hassle, here is what you should do:

  • You can start the ‘’index.php’’ removal process by accessing the WordPress dashboard.

wordpress-dashboard-6.5.2

  • Using the “Settings’’ menu accessible on the left side of the dashboard, click ‘’Permalinks’’.

from-settings-menu-click-permalinks-tab

  • Through the ‘’Permalinks Settings’’ page, you can update the website’s permalinks utilizing various options such as Post name, Day and name, and Month and name. Don’t forget to choose the structure apart from the ‘’Plain’’ setting.

day-and-name-post-name-month-and-name

  • Click the ‘’Save Changes’’ button once you have chosen the Permalink structure for your WordPress site.

click-save-changes-button-to-update-permalink-structure

Consequently, you can effortlessly remove index.php from WordPress URLs.

2. Updating the .htaccess file

This method or approach suits experienced users who know how to code and have some technical expertise. If they face the “404 Page Not Found” error on their sites even after updating the Permalink settings, they must edit the .htaccess file as early as possible.

To update the .htaccess file, follow the below-described steps:

  • Go to your WordPress installation root folder through the cPanel manager or FTP client. At this point, search for the .htaccess file. It is available in the same directory as the wp-content file.
  • You should edit the .htaccess file by right-clicking it and selecting the “Code Edit” or “Edit” option. Additionally, download the file, edit it via a text editor, and upload it again.
  • Add the following code at the beginning of the .htaccess file:
<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>
  • Save your changes into the .htaccess file and reupload it to the WordPress installation root directory.

You can now confirm if “index.php” has been removed from WordPress URLs. For that reason, you can open different web pages of your website in your browser to see if the URLs are simple and clean.

In addition, these URLs should not include the “index.php” segment.

What Should We Do to Make Our WordPress URLs User-Friendly?

When making WordPress URLs user-friendly and results-driven, website developers and owners must benefit from various proven tactics, including:

  • Use keywords logically
  • Keep URL structure consistent throughout the website
  • Keep URLs short and self-explanatory

Your WordPress website URLs should contain relevant keywords. Likewise, your URL and permalink structures must be consistent throughout your website.

Moreover, your chosen URL should be precise and adequately explain the content of your website.

Why Is Removing Index.php from WordPress URLs Crucial for Businesses?

If website developers and owners do not focus on removing index.php from URLs, they may eventually lose their online presence in search engines.

Online existence aside, website owners may fail to deliver exceptional user experience if they do not proactively bypass the index.php WordPress error.

Unsurprisingly, existing and potential website visitors can easily remember clean and simple URLs. Thus, small and large businesses can increase organic traffic to their official websites in the future.

Looking to Remove index.php from WordPress URLs Professionally?

Despite knowing how to remove index.php from URLs, get professional help from a seasoned WordPress development agency like WPExperts.

As a result, you will not need to focus on user experience and other ranking factors such as mobile friendliness, page speed, etc. That’s because WPExperts offers impressive WordPress website maintenance services to small and large businesses of varied sizes within their budget.

The service covers all the above-mentioned attributes, such as page speed, mobile optimization, and more, which are needed to boost your website’s organic ranking.

Wrapping Up

We hope you liked our guide, which helps you easily remove “index.php” from your WordPress website. This will improve your existing SEO practices and highlight your presence in leading search engines like Google.

Besides, you can enhance user experience considerably by creating simple yet impactful WordPress URLs.

Share This Article