Approx. read time: 5.3 min.
Post: Troubleshooting the WP Smush Plugin Error in WordPress: A Step-by-Step Guide
Troubleshooting the WP Smush Plugin Error in WordPress: A Step-by-Step Guide.
The error message below indicates that WordPress encountered a fatal error because it was unable to find and load a specific file required by the WP Smush Pro plugin. Specifically, the file class-gravity-forms.php
could not be found in the expected directory within the WP Smush Pro plugin’s folder structure. This kind of error typically occurs for one of a few reasons:
- Missing File: The file
class-gravity-forms.php
might be missing from the plugin’s directory. This could happen if an update failed, the plugin files were corrupted, or the file was accidentally deleted. - Corrupted Plugin: The plugin could be corrupted. This might occur due to issues during the plugin’s update process, conflicts with other plugins, or manual changes made to the plugin files.
- File Permissions: There could be a file permission issue preventing WordPress from accessing the file, though this scenario is less likely given the specific error message about a failed opening requirement.
Here are steps to resolve the issue: Troubleshooting the WP Smush Plugin Error in WordPress: A Step-by-Step Guide.
Backup Your Site – Troubleshooting the WP Smush Plugin Error in WordPress: A Step-by-Step Guide.
Before making any changes, ensure you have a complete backup of your WordPress site. This includes your database and all files in your WordPress directory.
Check Plugin Files – Troubleshooting the WP Smush Plugin Error in WordPress: A Step-by-Step Guide.
- FTP/SFTP Access: Use an FTP client or the file manager provided by your hosting service to check the WP Smush Pro plugin’s directory for the missing file. Navigate to
/wp-content/plugins/wp-smush-pro/core/integrations/
and look forclass-gravity-forms.php
. - Reinstall Plugin: If the file is indeed missing or if you’re unsure, the simplest solution might be to reinstall the plugin. You can do this by deactivating and deleting the current installation of WP Smush Pro from your WordPress admin panel, and then reinstalling it from the WordPress plugin repository or by uploading a fresh copy. Make sure to download the latest version from the official source.
Check for Conflicts – Troubleshooting the WP Smush Plugin Error in WordPress: A Step-by-Step Guide.
Sometimes, plugin conflicts can cause unexpected behavior. If the issue persists after reinstalling WP Smush Pro, try deactivating other plugins temporarily to see if there’s a conflict. If the site works as expected after deactivating a specific plugin, you’ve found the conflict source.
File Permissions – Troubleshooting the WP Smush Plugin Error in WordPress: A Step-by-Step Guide.
Although the error message doesn’t directly indicate a permissions issue, it’s wise to ensure that your WordPress files and directories have the correct permissions. Files should typically be set to 644, and directories to 755.
Contact Support
If you’re unable to resolve the issue yourself, consider contacting the support team for WP Smush Pro or your web hosting service. They may offer specific insights or solutions based on their systems and experiences with common issues.
Update WordPress Core and Other Plugins
Ensure that your WordPress core, themes, and plugins are all up to date. Sometimes compatibility issues can arise from outdated software.
Consider Professional Help
If you’re not comfortable performing these steps yourself, or if the problem persists, consider hiring a professional WordPress developer or contacting your hosting provider’s support team for assistance.
By following these steps, you should be able to resolve the error and get your site running smoothly again.
You get an email from your website WordPress similar to the following:
Howdy!
WordPress has a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
In this case, WordPress caught an error with one of your plugins, Smush Pro.
First, visit your website (https://www.yoursite.c
Please contact your host for assistance with investigating this issue further.
If your site appears broken and you can’t access your dashboard normally, WordPress now has a special “recovery mode”. This lets you safely login to your dashboard and investigate further.
https://www.yoursite.co
To keep your site safe, this link will expire in 1 day. Don’t worry about that, though: a new link will be emailed to you if the error occurs again after it expires.
When seeking help with this issue, you may be asked for some of the following information:
WordPress version 4.1.2
Current theme: Avada (version 4.1.5)
Current plugin: Smush Pro (version 2.1.5)
PHP version 7.0.30
Error Details
=============
An error of type E_ERROR was caused in line 342 of the file /mnt/data/vhosts/yoursite.com/httpdocs/wp-
Stack trace:
#0 /mnt/data/vhosts/yoursite.com/httpdocs/wp-
#1 /mnt/data/vhosts/yoursite.comt/httpdocs/wp-
#2 /mnt/data/vhosts/yoursite.com/httpdocs/wp-
#3 /mnt/data/vhosts/yoursite.com/httpdocs/wp-
#4 /mnt/data/vhosts/yoursite.com/httpdocs/wp-
#5 /mnt/data/vhosts/yoursite.com/httpdocs/wp-
#6 /mnt/data/vhosts/yoursite.com/httpdocs/wp-
#7 /mnt/data/vhosts/yoursite.com/httpdocs/wp-
#8
thrown