If you are running a WordPress website, then there are multiple tweaks that you will have to apply to make your site better. There are various reasons to remove index.php from WordPress URL and you should understand the importance of it.
If you are seeing it in every post and page, then it won’t look good and it can be an issue for you. Index.php appears at the end of the URL mostly because of the site migration. If you have recently migrated your WordPress website, then you will experience this specific thing.
Here, we will be discussing all the steps that will help you remove index.php from WordPress URL. If it is appearing in every URL, then you should know that it is coming from permalinks.
Remove index.php from WordPress URL
To remove this specific chunk from the WordPress URL, you will have to follow small and easy steps. Make sure that you have taken a complete backup of your website so you don’t have to face issues later on.
Index.php usually appears in the URL because of the Windows-based hosting server. If you are using a Linux based server, then you won’t face this specific issue. To remove index.php from URL, you will have to visit Dashboard > Settings > Permalinks.

You will see the tab for permalink settings of your website. Click that tab to see the current permalink structure of your WordPress website. In this case, it will look like this:

You will have to change permalink to Post Name and save the changes. This will remove index.php from every URL of your website.

After making the changes, you will be able to see the results and you won’t face this issue again. WordPress will automatically redirect the old links and it won’t affect the traffic coming to your website.
Why you need to remove index.php from WordPress URL
If your WordPress posts are displaying index.php at the end of the URL, then you need to remove it as it is no search engine friendly. You should always stick to the post name permalink structure when running a site on WordPress.
You should know that index.php does not add any value to the content. It usually comes when you are running a website on Windows-based hosting server.
Check internal links after removing index.php
Once you have made the changes and removed index.php from the URLs, you will have to check all the internal links of your website. Make sure that you no links are broken. After making changes to the permalink structure, it can happen and it will affect your ranking as well.
More importantly, you should also consider resubmitting sitemap to Google Search Console after making permalink changes. You can use a plugin named, ‘Broken Link Checker’ to make sure that all the links are working fine.
Final Thoughts
Once you have removed index.php from WordPress URL, then you can continue adding content in posts and pages and you won’t face this issue at all. However, you should consider checking internal links to see if they are broken or not. Stay tuned for lots of WordPress guides & Tutorials and keep suggesting better solutions.