Converting tables between InnoDB and MyISAM storage engines is occasionally needed for specific performance or compatibility reasons. In most cases, InnoDB is the better choice for modern applications. Here is how to convert if needed.
Convert a single table
ALTER TABLE tablename ENGINE = MyISAM;
Or to convert back:ALTER TABLE tablename ENGINE = InnoDB;
Run these in phpMyAdmin or via SSH.
01. Convert All Tables in a Database
Via SSH, generate and run the ALTER statements for all tables:
mysql -u dbuser -p -N -e "SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=MyISAM;') FROM information_schema.TABLES WHERE TABLE_SCHEMA='dbname' AND ENGINE='InnoDB';" | mysql -u dbuser -p dbname
InnoDB is almost always better. It supports transactions, row-level locking, crash recovery, and foreign keys. MyISAM is only preferred for read-heavy tables that never get concurrent writes. WordPress, Joomla, and all modern CMS platforms are designed for InnoDB. Converting to MyISAM can cause data corruption under concurrent write loads.
For ibdata1 management and InnoDB disk space, see Clean/Shrink ibdata1. For database optimization, see Backup MySQL.
Database Help?
Open a Support TicketQuick Recap
- ALTER TABLE ... ENGINE = MyISAM to convert
- InnoDB is better for most applications
- MyISAM only for read-heavy, no-concurrent-write scenarios
- Back up before converting
- Do not convert WordPress tables to MyISAM
Database administration · Last updated March 2026 · Browse all Server Maintenance articles
