How To Fix Fatal Error: Call to a member function flush_rules() with Enabling SSL

The month of July is here, and Chrome 68 will now show “Not Secure” for all unencrypted connections. For WordPress users, it means moving over to HTTPS without hassles or losing traffic. If your web host supports “Letsencrypt” then you can easily move your existing site from HTTP to HTTPS and use a simple 301- redirect to ensure no traffic disruptions. To easily do this, we recommend using “Really Simple SSL.” However, you might encounter into Fix Fatal Error: Call to a member function flush_rules(). How to fix that? Let’s find out.

Fix Fatal Error: Call to a member function flush_rules(): The Fix

In our example, we will use SiteGround Hosting as an example. The first step is to enable SSL on your account. The option is available under the “Manage Account” section on the main user panel. See below:

Once you have confirmed that the certificate has been issued, you can go to the WordPress Admin Panel and add the “Really Simple SSL” if not done already.

Once you are on the Plugin Menu which says:

Almost ready to migrate to SSL!
Some things can’t be done automatically. Before you migrate, please check for:
Http references in your .css and .js files: change any http:// into //
Images, stylesheets or scripts from a domain without an 
ssl certificate: remove them or move to your own server.

When you click on “Go ahead, Activate SSL,” You might encounter the following error:

Fatal error: Call to a member function flush_rules() on null in /wp-includes/rewrite.php on line 273`

To fix this, I had to do two things.

  1. Clear and Purge All Cache (SG Cache in our case)
  2. Under “wp-admin/options-permalink.php” click on “Save Changes.”

That’s it. When we went back and activated SSL, it worked without any further error messages.

Conclusion

Let us know about your experience with our solution provided. Are you facing similar issues? Let us know in the comments section below. Thanks for visiting!

spot_img

More from this stream

Recomended