Moving an MT Install
From Movable Type
This page describes a way to migrate a Movable Type installation from one server to another. Feel free to contribute additional tips.
- Move Movable Type installation from source to destination, or install Movable Type on destination
- Use scp to copy the entire ~/cgi-bin/mt directory tree
- Dump MySQL database from source
- mysqldump ---user root database_name | gzip > /usr/local/database_name.sql.gz
- Transfer MySQL database dump from source to destination
- Load MySQL database on destination
- gunzip database_name.sql.gz
- mysql database_name < database_name.sql
- Discover Movable Type superuser credentials on destination by querying the MySQL database
- select author_id, author_name from mt_author where author_is_superuser = 1 limit 1;
- Set the superuser's password on destination to something you know
- update mt_author set author_password=encrypt('changeme') where author_id = whatever_the_author_id_is_in_the_above_query;
- Run a query to check to see if the author_auth_type is consistent. (This is a bug that was introduced in the MT 4.0 beta process to some client sites.)
- select distinct(author_auth_type) from mt_author;
- If author_auth_type result contains NULL, then run an update query to correct this.
- select distinct(author_auth_type) from mt_author;
- Run the Upgrade script in the tools directory
- cd /var/www/cgi-bin/mt
- sudo -u apache_user perl tools/upgrade --name=whatever_the_author_name_is_in_the_first_sql_query
- Localize paths
- select blog_id, blog_site_url, blog_site_path from mt_blog;
- update mt_blog set blog_site_path = replace(blog_site_path, '/source/path', '/destination/path');