1. Flush your permalinks by going to “Settings” > “Permalinks” and click Save.
(I realized you already did this, but others may not have)
2. If running Apache, check that .htaccess matches this:
# BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress
3. If Apache check the mod_security module. Your can disable the mod_security module from the cPanel interface. If you are unable to locate the module or don’t have access, request your web host to disable mod_security. Clear cache and then try your permalinks again and see if that cleared the issue. Once done, re-enable mod_security.
4. Disable all plugins and switch to a standard WordPress theme (such as Twenty Twenty-Two). Clear cache and check your permalinks. If this resolved the issue, re-enable your theme and plugins 1-by-1 to check for possible causes.
5. While it may be odd, the following does work occasionally:
Within your dashboard go to: “Settings” > “Permalinks”. Then select “Custom Structure”. Inside the input field, enter:
/%category%/%postname%/
Click “Save”, clear your cache and check your permalinks.
6. If Apache, you may not have mod_rewrite enabled. If you have console access, you can enable it by entering:
sudo a2enmod rewrite
When done, don’t forget to restart Apache. 😉
service apache2 restart
7. Check your override rules. Depending on your config, it will be located in one of these files: apache2.conf, http.conf, or 000-default.
Under Directory /var/www/
change Override None
to Override All
Good Luck!