LiteSpeed

WordPress 404 Not found error on LiteSpeed Web Server[Solved][2025]

As you might already know, LiteSpeed Web Server is the fastest compared to Ngnix and Apache.
You probably wanted to speed up your website speed by switching your web server from Apache to LiteSpeed Web server, but migrating from Apache server to LiteSpeed Web Server got you in trouble.
There are chances that WordPress is showing a “404 Not found” error and no page or post links are working except homepage and WordPress admin dashboard.

404 Not found Error in WordPress using Litespeed Web Server

Don’t panic, your website is still safe if it’s showing you a 404 Not found error after you migrated to LiteSpeed.

Solution:

1. Login into FTP or file manager and locate to your WordPress directory(normally it’s under “public_html”)
2. Edit your .htaccess file using the file manager edit function
3. Check for the below code

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

You need to add “/” in the second line of code or simple copy/paste the below code with the current code in your .htaccess

RewriteEngine On
RewriteBase /
RewriteRule ^/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Important Step: Restart LiteSpeed Web Server and your website will be working fine.

Q) What was causing the issue?
Ans. Missing “/” in the second line of code was causing the issue and adding it fixed the problem.

This issue is common when you migrate from cPanel to CyberPanel or to any other control panel using LiteSpeed Web Server

Feel free to share your questions in the comment section.

Sufiyan Shaikh

Recent Posts

CyberPanel Server Error (500)

Server Error (500) when trying to access the Cyberpanel If you are getting this error while accessing the cyberpanel, there…

11 months ago

How to connect and use github with DirectAdmin git feature

How to connect git with DirectAdmin Login into SSH and run the following command to create a new key pair…

12 months ago

How to host next js app on cpanel

How to host next js app in cpanel Login > Setup Node.js App > Create Application Enter the values shown…

1 year ago

WHMCS Development environment set

Update via PHPMYADMIN: Disable Captcha : UPDATE tblconfiguration SET value = '' WHERE setting = 'CaptchaSetting'; Update WHMCS link: UPDATE…

1 year ago

Lagom WHMCS notification hide pages list

3dsecure Access Denied Affiliates Affiliates Signup Announcements Banned Configure Products Downloads Downloads Denied Error Login Logout Password Reset Ticket Feedback…

1 year ago

Export/Import database via command line(ssh)

Export Database via SSH mysqldump --routines -u databaseusername -p databasename > database.sql   Import Database via SSH mysql -u databaseusername…

1 year ago