To remove index.php from the URL in WordPress, you need to adjust your permalink settings and possibly update your .htaccess file. Here's a step-by-step guide on how to do this:
1. Update Permalink Settings in WordPress
Log in to your WordPress admin dashboard.
Go to Settings > Permalinks.
Select a permalink structure that doesn’t include index.php, like the "Post name" option, which is typically set as /sample-post/ (or any other structure you prefer).
Click Save Changes to apply the new settings.
2. Update .htaccess
WordPress usually updates the .htaccess file automatically when you change permalink settings, but if that doesn’t happen or if you're still seeing index.php, you may need to manually adjust it.
Use an FTP client or your hosting file manager to find and open the .htaccess file in your WordPress root directory.
Ensure your .htaccess file has the following code (if not, add it):
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule ^(.*)$ /index.php/$1 [L] </IfModule> # END WordPress
After making these changes, it’s a good idea to flush the rewrite rules by visiting Settings > Permalinks in the WordPress dashboard and clicking Save Changes again.
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
How can I remove index.php from the URL?
https://new.azmaneye.com/index.php/your-baltimore-eye-doctors/
Hi Stephen,
To remove index.php from the URL in WordPress, you need to adjust your permalink settings and possibly update your .htaccess file. Here's a step-by-step guide on how to do this:
1. Update Permalink Settings in WordPress- Log in to your WordPress admin dashboard.
- Go to Settings > Permalinks.
- Select a permalink structure that doesn’t include index.php, like the "Post name" option, which is typically set as /sample-post/ (or any other structure you prefer).
- Click Save Changes to apply the new settings.
2. Update .htaccess# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
# END WordPress
After making these changes, it’s a good idea to flush the rewrite rules by visiting Settings > Permalinks in the WordPress dashboard and clicking Save Changes again.
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver