Title: Plugin causes site critical error
Last modified: February 28, 2024

---

# Plugin causes site critical error

 *  Resolved [egn145](https://wordpress.org/support/users/egn145/)
 * (@egn145)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/plugin-causes-site-critical-error/)
 * After installing and activating the plugin on my site and attempting to log in
   as admin again, I couldn’t. Instead, I got a white screen with an error message
   and an automated email from WordPress stating that WordPress encountered an error
   with the Speed Optimizer plugin (the email identified it). Also, in the email,
   the following error details were included. I have now deactivated the plugin.
 * A type E_ERROR error was found in line 229 of file /var/www/vhosts/[site address]/
   httpdocs/wp-content/plugins/sg-cachepress/core/Ssl/Ssl.php. Code Error: Uncaught
   Error: Call to undefined function SiteGround_Optimizer\Ssl\exec() in /var/www/
   vhosts/[site address]/httpdocs/wp-content/plugins/sg-cachepress/core/Ssl/Ssl.
   php:229
   Stack trace:#0 /var/www/vhosts/[site address]/httpdocs/wp-content/plugins/
   sg-cachepress/core/Ssl/Ssl.php(128): SiteGround_Optimizer\Ssl\Ssl->switch_protocol()#
   1 /var/www/vhosts/[site address]/httpdocs/wp-content/plugins/sg-cachepress/core/
   Ssl/Ssl.php(323): SiteGround_Optimizer\Ssl\Ssl->disable()#2 /var/www/vhosts/[
   site address]/httpdocs/wp-includes/class-wp-hook.php(326): SiteGround_Optimizer\
   Ssl\Ssl->maybe_switch_option(‘eleagn’)#3 /var/www/vhosts/[site address]/httpdocs/
   wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)#4 /var/www/
   vhosts/[Site address]/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(
   Array)#5 /var/www/vhosts/[site address]/httpdocs/wp-includes/user.php(121): do_action(‘
   wp_login’, ‘[login username]’, Object(WP_User))#6 /var/www/vhosts/[site address]/
   httpdocs/wp-login.php(1311): wp_signon(Array, true)#7 {main}  thrown
 * WordPress version: 6.4.3
   Active theme: Rosana Child (version 1.1)Current plgin:
   Speed Optimizer (έκδοση 7.4.6)PHP version 8.2.16
    -  This topic was modified 2 years, 3 months ago by [egn145](https://wordpress.org/support/users/egn145/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-causes-site-critical-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Pavel Dosev](https://wordpress.org/support/users/pdosev/)
 * (@pdosev)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/plugin-causes-site-critical-error/#post-17460798)
 * Hello [@egn145](https://wordpress.org/support/users/egn145/),
   The error you encountered
   with the Speed Optimizer plugin seems to be due to a restriction on your hosting
   server. The plugin requires a function called `exec()`, which is probably not
   enabled on your server. This function is essential for some of the plugin’s features
   to work properly.
 * To address this, the first step is to reach out to your hosting provider and 
   ask if they can enable the `exec()` function for your website. It’s worth noting
   that this function is commonly disabled for security reasons, so they might not
   allow it. The function itself uses **wp-cli **and executes this command, which
   is part of the HTTPS force and is changing the URLs in the database to use HTTPS:
 *     ```wp-block-code
                   // Build the command.
                   $command = sprintf(
                           "wp search-replace '%s' '%s' --all-tables",
                           $from . $site_url_without_protocol,
                           $to . $site_url_without_protocol
                   );
   
                   // Execute the command.
                   exec(
                           $command,
                           $output,
                           $status
                   );
       ```
   
 *  Thread Starter [egn145](https://wordpress.org/support/users/egn145/)
 * (@egn145)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/plugin-causes-site-critical-error/#post-17461214)
 * Hi Pavel, I contacted my hosting provider, but unfortunately, they won’t allow
   it. They would only make a rare exception for sites running on dedicated or semi-
   dedicated servers but not for regular web hosting ones. Therefore, sadly, I can’t
   use the plugin unless you change it in the future so that it doesn’t require 
   this security setting to be off.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin causes site critical error’ is closed to new replies.

 * ![](https://ps.w.org/sg-cachepress/assets/icon-256x256.gif?rev=2971889)
 * [Speed Optimizer - The All-In-One Performance-Boosting Plugin](https://wordpress.org/plugins/sg-cachepress/)
 * [Support Threads](https://wordpress.org/support/plugin/sg-cachepress/)
 * [Active Topics](https://wordpress.org/support/plugin/sg-cachepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sg-cachepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sg-cachepress/reviews/)

## Tags

 * [critical error](https://wordpress.org/support/topic-tag/critical-error/)

 * 2 replies
 * 2 participants
 * Last reply from: [egn145](https://wordpress.org/support/users/egn145/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/plugin-causes-site-critical-error/#post-17461214)
 * Status: resolved