Tuesday, August 29, 2023

Solving Wordpress Critical Error on WP Admin's Login

If you get a "Critical Error" white screen when accessing your WP admin, look into the server's logs. Some hosting companies and software like CPanel make accessing logs quite an easy task.

My logs showed the following PHP error:

 [Tue Aug 29 11:53:45.667499 2023] [proxy_fcgi:error] [pid 592:tid 139914188318464] [client 1.2.3.4:0] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class "Elementor\\Core\\Schemes\\Color" not found in /home/user............quire_once('/home/user...')\n#6 /home/user/public_html/wp-admin/upgrade.php(18): require('/home/user...')\n#7 {main}\n thrown in /home/user...', referer: https://www.my.site/wp-admin/ 

The biggest challenge was to find what exactly is the path to the file which refers this "Elementor\\Core\\Schemes\\Color"  class. It appeared to be in /public_html/wp-content/mu-plugins/typography.php

I commented out all PHP content and tried to login again. This time there were no error and the WP offered me to complete the DB upgrade. Once the "Upgrade" button was pressed I instantly got the WP Dashboard back. The only thing that was left was to uncomment the code in /public_html/wp-content/mu-plugins/typography.php

No comments: