Daniel posted: " It's common for a plugin to cause a fatal or critical error in WordPress that results in loss of access to a site's public web pages or WP Admin area. That fact that it is common doesn't make it any less terrifying to experience. When a fatal error occur" Jetpack
It's common for a plugin to cause a fatal or critical error in WordPress that results in loss of access to a site's public web pages or WP Admin area. That fact that it is common doesn't make it any less terrifying to experience. When a fatal error occurs on a WordPress site, it is usually due to a bug in the responsible plugin or theme code that causes the affected site's server to become stuck and unable to respond to requests.
Usually, the WordPress.org software displays a critical error message when a bug on the site is causing an error preventing the site from working. WordPress also emails the site administrator with more details about the error. If you cannot find that email, the next best step would be to check the PHP error logs in your web hosting account, if those are available. If you're unsure how to access those logs, your web host can help you. You can also put WordPress in debug mode and check the error messages displayed when you attempt to visit your site.
However you get the error messages, the entire message should include the name of the plugin, theme folder, or file causing the error. Upon discovering the plugin causing the error, you might wonder how to remove the plugin or theme and get your site working again when the plugin error prevents you from accessing your WP Admin area. Deactivating plugins via WP Admin is not the only way. There's another way:
Step 1: Get your site's SSH, SFTP, or FTP credentials
Now that your site is down, you'll need the correct credentials to access your site's files remotely via other non-HTTP means. SSH (Secure Shell), SFTP (SSH File Transfer Protocol), FTPS (also known as FTP-SSL, and FTP Secure), and FTP (File Transfer Protocol) are different types of server access protocols/schemes.
These credentials allow you, or a service like Jetpack Backup, to directly access your site's files on the server powering your website. You can get these from your hosting account dashboard or with the help of your hosting provider's support. Note that these server access credentials are unique and different from your WP Admin login details and, in most cases, your host's control panel or dashboard login.
Step 2: Download a file transfer client application
For the next step, you will need to use a file transfer client app/software like FileZilla or Transmit. The file manager option in your WordPress hosting control panel is also a good option, but it might be better to use a file transfer client as they consistently provide better interfaces for viewing your site's files than many hosting account file managers.
Step 3: Connect to your server using the credentials
Once you have your SSH, SFTP, or FTP credentials and a file transfer app installed on your device, proceed to connect to your site using the credentials. FileZilla has some usage instructions that should help guide you along the way. Transmit also has a help guide on using their Quick Connect feature to connect to your server.
The general process is to choose the protocol or server type and to fill out the form with the details (server address, username, password, port, and remote WordPress installation path that you have gotten from your hosting account, support, or server administrator). Once you have done that, click Connect or the equivalent on the file transfer app of your choice to connect to your server. When you have successfully connected, you should see a list of files and directories in the remote path you provided. Here's what that looks like in Transmit:
Step 4: Rename the plugin folder to deactivate it
Now that you're connected and can see your site's files and folders, navigate to the wp-content folder. Inside this wp-content folder, you will see a folder called plugins where WordPress stores the files for all plugins installed on your website.
Navigate to the plugins folder, select the plugin culprit and right-click to view more options. Click Rename or the equivalent on your chosen file transfer client. Then set the new name of the folder to something like plugin-name.deactivate. In other words, add .deactivate to the name of the folder. Here's what that the rename option looks like in Transmit:
Once you rename the plugin, it will be deactivated because WordPress won't be able to find the plugin folder when it looks there. If that plugin was the cause of the critical error, you should regain access to your WordPress site and the admin area. If you navigate to WP Admin > Plugins, you should see a notification saying that the plugin has been deactivated because the plugin file does not exist like so:
That's it. You can follow the same steps to deactivate a theme if a theme is responsible for the critical error. Only this time, you should navigate to wp-content/themes when you have connected to your site via SSH, SFTP, or FTP. If a theme bug is actually stopping you from accessing your site, then renaming the theme folder should resolve the issue.
Hopefully, this article has helped you resolve a critical error on your site. You may want to check out our Jetpack Backup product or the Jetpack Security bundle to keep your WordPress site's data safe. With regular malware scans, a web application firewall, real-time backups, and one-click restores, you can relax and focus on publishing awesome content for your readers.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.