• Resolved geoffdaw

    (@geoffdaw)


    I am running version 3.2.3 on WordPress 5.2.2. When I try to activate SSL I get the error:
    Fatal error: Call to a member function flush_rules() on null in /home/********/public_html/***************/wp/wp-includes/rewrite.php on line 276

    After that the plugin appears to be working but I still have the ‘Almost ready to migrate to SSL!’ box on the Dashboard.

    The source line that is failing is:
    $wp_rewrite->flush_rules( $hard );

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mark

    (@markwolters)

    Hi,

    this is usually caused by a plugin conflict and happens when a different plugin tries to flush the rewrite rules at the same time as Really Simple SSL. Plugins should only flush their own rewrite rules. You can test which plugin is causing this by temporarily disable other plugins and then try to activate SSL again. If SSL has been activated and the message is still there, you can add the following to your themes functions.php file to dismiss the message:

    add_action("init", "rsssl_dismiss_success_message");
    function rsssl_dismiss_success_message(){
      $options = get_option('rlrsssl_options');
      $options['ssl_success_message_shown'] = true;
      update_option('rlrsssl_options',$options);
    
    }
    Thread Starter geoffdaw

    (@geoffdaw)

    Thanks Mark for the quick response. That did the trick but I don’t know which of the plugins caused the problem. There were only 4 simple plugins and I couldn’t imagine why any of them would be using rewrite rules.

    Plugin Author Mark

    (@markwolters)

    Glad to hear that fixed the issue. If a plugin deals with custom post types or needs to edit the .htaccess file it might also flush the rewrite rules. What plugins were you using exactly?

    Thread Starter geoffdaw

    (@geoffdaw)

    The plugins were:
    CMS Tree Page View
    Easy WP Meta Description
    Search & Replace
    TinyMCE Advanced

    I have done a code search on the plugins and there are no references to wp_rewrite or flush_rules.

    I have other sites to upgrade to use ssl so I will see if I hit the same problem and if I do then I will disable the plugins one at a time. In any case I will report back.

    Thread Starter geoffdaw

    (@geoffdaw)

    I hit the same problem when upgrading other sites and I believe I have narrowed it down to the Search & Replace plugin. Disabling just that plugin seemed to get rid of the error.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error when activating SSL’ is closed to new replies.