When I update my page I see this error and I tried to fix it but that didn't work. I removed all plugins and checked but it was still not fixed. Then I removed all themes and installed another theme but still it is not fixed. Now I am confused how to fix it. Please guide me how to fix it and why this error is showing?
You should troubleshoot your website for plugins and WordPress Themes.
Make sure your PHP version is 7.3 or above.
As you are unable to access your WordPress admin area so please try to access your file manager in cPanel or access public_html directory via FTP. Plugins and Themes directories are inside wp-content/ directories.
Go to wp-content/ Directory them rename plugins/ directory to pluginsbackup/ now try to load your site. If this works that means you have problem with a plugin.
If problem is with plugin change back the directory name pluginsbackup/ to plugins/ Enter in plugin directory. Now rename each plugins directory by placing backup at end of that directory name.
Once you have changed all plugins directories names, start getting original directory names one by one and make sure you check the website if that’s still working after each plugin start working. As soon as you see which plugin is making problem just delete that plugin.
If you can't figure out what's wrong please turn on the wp debug mode so you can get details of error. Edit your wp-config.php from WordPress root using FTP. And
Find in wp-config.php
And replace with
Once you turn on the wp debug mode you are not able to see the details of issue, weather is related to some missing file or some plugin is producing the FATAL error you can track and apply appropriate fix. Thanks. Once problem is fixed don't forget to turn off the debug mode in
That may not be a valid error. But the troubleshooting link provided in a comment to your question is a good place to start. Error logs are great help.
You should also provide additional info (edit your question). When does this happen? All pages? Admin area only? Alternate Tuesdays?
Make sure that you install themes/plugins only from the WP repository. There have been instances of malware'd plugins/themes causing problems.
Here's how I resolved this same issue when it completely logged me out of my site: - Install wp-rollback plugin via FTP or Cpanel > File Manager - To activate the plugin, follow this instruction here: Activate a plugin through PHPMyAdmin or FTP?