How do I resolve 403 errors with Litespeed?

There are three main causes of 403 errors on your site:

Web application firewall

First turn WAF off as quick troubleshooting step. If 403 persists, the error is not due to the firewall. If it disappears, turn the firewall back on then follow the steps here to identify and disable the rules that are causing your issue.

.htaccess configuration

If you’re getting 403s not caused by the WAF, .htaccess can be to blame. Review var/log/litespeed/error.log and look for errors labelled “Access is denied by context rewrite.” This indicates a 403 that is being generated by htaccess.

Application-level config (i.e. inside WordPress)

At the platform level, we can’t do anything about #3, so this article focuses on the first two.