How to fix 404 errors on WordPress Website for LiteSpeed Webserver?
In case you are getting “404 page not found
” error on WordPress website, then you need to edit your .htaccess file
and replace the existing WordPress rules with these rules :
RewriteBase / RewriteRule ^/index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]
“/” is the location WordPress was installed relative to the vhost docroot.
Save the file and restart litespeed.
Note:
In case you are using a cyber panel, then make sure you edit the .htaccess file from the file manager and save it once from there. Directly editing the file from the terminal doesn’t seem to work the way it works.