Best and Safest Way to Convert WordPress MyISAM to InnoDB Storage Engine

There is a lot on information on the web about MyISAM vs InnoDB storage engine and WordPress. If you check your WordPress database, you will probably see a mixture of both.

While this is perfectly normal and will cause no serious or fatal issues, most professionals agree that MyISAM is pretty much dead and InnoDB is the way to go.

So how do you convert all your MyISAM tables to InnoDB? There are several questionable SQL scripts and a couple of plugins for that, still there is a simpler and completely safe way for WordPress.

BACKUP YOUR COMPLETE WORDPRESS DATABASE BEFORE DOING ANY CHANGES

Enable Maintenace mode on your WordPress, using some plugin.

Install LiteSpeed free caching plugin and activate it. If you alread have some other caching plugin, please deactivate it for a while. LiteSpeed is a caching and optimizer plugin mainly for websites under LiteSpeed web server. If you do not use LiteSpeed web server, relax, it doesn’t matter since we will only use this plugin’s Database tools. It will be disabled and removed after the database convertion.

LiteSpeed has several Database tools and in there you have the option to convert any tables to InnoDB. Again remember to have a full BACKUP of your database, before doing any changes.

After you convert the tables you need to InnoDB, disable and delete the LiteSpeed Cache plugin.

If you had a caching plugin, re-enable it and disable Maintenance mode. Clean your cache plugin cache. And that’s it. Check if everything is working right.

If you do not already have a caching and optimizing plugin for WordPress AND you are on a LiteSpeed webserver, you may want to keep it enabled and give it a try. Just be careful because there are tones of settings.

In our case LiteSpeed caching plugin works great with minimal settings, since if you enable a lot of options, you actually make WordPress slower. For exampe HTTP/2 Push, ESI blocks make things much slower everywhere in WordPress.

Check LiteSpeed Cache plugin at WordPress.org

One Comment

Comments are closed.