WordPress: There has been a critical error on this website

I transferred my WordPress website from my local Apache server to OpenLiteSpeed. The website has 10 pages, including 4 pages accessible to the public, 5 pages for registered customers, and 1 page for login purposes.

The public pages and login page are functioning correctly in OpenLiteSpeed. However, when I attempt to access any redirected page (customer page) after login, I receive an error message stating “There has been a critical error on this website.” Interestingly, all redirected pages work without any issues on the local Apache server.

What’s even stranger is that all pages, including the public pages and login page, display the same error message when any redirected page (customer page) encounters the error. It’s almost like a contagious virus.

When I clear the browser cache, everything returns to normal, except for login activity, where the same error message reappears on all redirected pages again and again.

Hello @jamesm671

Kindly post your .htaccess here for guidance

Thanks, josephgodwinke
Here you are:

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

The issue is either a php memory limit needs to increased or you have a plugin or theme conflict

  1. Increase php memory limit at https://SERVER_URL:8090/managephp/editPHPConfigs and see if issue goes away

  2. Disable all plugins and see if issue goes away

  3. Change theme to default wordpress theme say twentytwentythree theme or something default and see if issue goes away

Thanks, josephgodwinke.
I have disabled all plugins, including OLS cache.
I will try the other two.
Thanks again, josephgodwinke.

Hi, josephgodwinke.
I have done all three of them, but the problem persists.
As for the theme, I changed it to twentytwentythree, but the “log in” button goes away, so I can not test any further.

By the way, I have noticed that OLS replaced my old .htaccess without any notification and reasons. I am wondering if it cause some problems.

Hi josephgodwinke
I have two posts recently, none of them gets reply.
What’s going on? Did I commit some kind of crime that this forum does not allowed? :slight_smile:

Do you have these rewrite rules ?

I provided my .htaccess four days ago per your request.
By the way, please check out my another post when you get a chance. thanks.
CyberPanel on Azure “took too long to respond”