Hi, folks. In this post, we will help you to change the MySQL / MariaDB storage engine to a WordPress site. Particularly we’ll change all to InnoDB but also the procedure works for MyISAM.
Previously we explained that the storage engine is a fundamental component of database managers. With them, we define many ways about how our data is stored. Also, it is good to say that there are many and all are good but each in certain circumstances.
So, if your WordPress site needs a change of storage engine, in this post we will tell you how to do it easily and safely.
In this post, it is assumed that WordPress is already installed and running. If not, there are our posts that will help you install it without problems.
To facilitate the whole process, we have chosen to use also PHPMyAdmin as a tool. This will help us with some steps.
With this done, we can start.
Changing MySQL / MariaDB storage engine for a WordPress site
Open your web browser and open PHPMyAdmin. You will see the following screen:
As you can see in the image, I have a database called wordpress which is where the site data is.
The process is quite safe but it is always convenient to make a backup of the database.
So, select the wordpress database and go to the Export tab and make a backup of the whole database by pressing the Go button.
Perhaps the fastest method is to use SQL code. So, click on the SQL tab.
What we have to do is modify each table that makes up the WordPress database. As I am using a recent installation of WordPress you may have many more tables.
So, in my case these are the lines I have to run:
ALTER TABLE wp_commentmeta ENGINE=InnoDB; ALTER TABLE wp_comments ENGINE=InnoDB; ALTER TABLE wp_links ENGINE=InnoDB; ALTER TABLE wp_options ENGINE=InnoDB; ALTER TABLE wp_postmeta ENGINE=InnoDB; ALTER TABLE wp_posts ENGINE=InnoDB; ALTER TABLE wp_termmeta ENGINE=InnoDB; ALTER TABLE wp_terms ENGINE=InnoDB; ALTER TABLE wp_term_relationships ENGINE=InnoDB; ALTER TABLE wp_term_taxonomy ENGINE=InnoDB; ALTER TABLE wp_usermeta ENGINE=InnoDB; ALTER TABLE wp_users ENGINE=InnoDB;
Remember that if you want to change to MyISAM you only have to modify the commands, for example:
ALTER TABLE wp_commentmeta ENGINE=MyISAM;
Then click on the Go button.
Then you will see a screen where you can see that each modification has been done correctly.
And you will continue to enjoy your website without any problems.
So, enjoy it.
Changing the storage engine of all the tables in a WordPress site can be helpful for your site. The process is quite simple, but it is always advisable to do it after backing up our database.
So, share this post and join our Telegram Channel.