removed index.php now all pages 404

If you want to remove the index.php from your URL structure, then using this rewrite rule (assuming you’re using Apache, from your question) in your .htaccess will help.

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Then, flush permalinks by either using WP-CLI and running wp rewrite flush, or visiting the Permalinks settings page and clicking the save button. You don’t need to make any changes before saving, but if you want to be sure to use just the post slug, click that radio option first, then save to flush permalinks.

Leave a Comment