graphicpush

Moving a Textpattern Install to a New Host

I needed an easy way to move a Textpattern install from one host to another. Thanks to Rob Sable’s database manager plug-in, I was able to completely avoid mucking about in phpMyAdmin. The process, it turns out, is dead simple.

Moving a database-driven CMS from one host to another can be a daunting task for the MySQL newb — complete data loss seems too easy. But I recently moved my Textpattern-based personal domain over to Dreamhost, and it was a surprisingly straightforward process that even a technical moron like me could handle.

The Textpattern wiki offers a direct way of transporting everything with phpMyAdmin and MySQL dumps, but I figured there must be a simpler, plug-in way. And by gosh, there is.

Rob Sable, plug-in writer and Textpattern evangelist, crafted one of the best admin plug-ins available, rss_admin_db_manager. This brilliant extension enables you to perform MySQL wizardry like table repair, command execution and data archive inside the TXP backend interface. However, a non-advertised (and probably unsupported) feature is using the plug-in to move a complete install from one host to another.

So, if you don’t feel like mucking about in phpMyAdmin, follow these steps:

  1. Install Rob’s plug-in to your current Textpattern environment.
  2. Navigate to Extensions > DB Backup. Take note of the “Backup Path” and make sure the directory is completely writeable (chmod to 777 from your FTP interface). Click either “sql file” or “gzipped file.” If it worked, an entry should appear under the heading “Previous Backup Files.”
  3. From your FTP software (I recommend Filezilla), download an entire copy of your current site. You do not need to grab the core TXP files since you will be doing a fresh TXP install on your new server, but take special care to grab the directory with the SQL backup files.
  4. On your new server, install a fresh copy of Textpattern. For best results, make sure you use the same version of TXP as the install you are coming from. Also, your life will also be easier if you use the same username and password. (You do not need to keep the MySQL info the same as the old install.)
  5. In your new Textpattern, install rss_admin_db_manager. Do not install any other plug-ins; they will be carried over. After the plug-in is loaded, take note of “Backup Path” in the “DB Backup” tab; it may be different than your other install.
  6. Make sure your new “Backup Path” is writeable (chmod 777) and upload your backup SQL file to that directory.
  7. Navigate to Extensions > DB Backup and refresh your browser. Your backup files should appear in “Previous Backup Files.” Click “restore.” Everything from your old site will be recovered — logs, articles, presentation files, plug-ins — instantly.
  8. Copy over your images, CSS, Javascript and any other supporting files via FTP.

That’s it. Simple, simple. Special thanks to Rob for crafting a life-saving plug-in. I’m not sure if other people have documented this process before — I just did it myself over the weekend as an experiment and it worked (so far). I have not tried this on a site with comments enabled, so I would appreciate any feedback from others who have.

commentary + criticism

Rob

wrote the following on Wednesday April 26, 2006

Thanks much for the write up Kevin.

Another benefit of using the plugin is that the backup process includes all tables in your MySQL database. If you have tables for additional software such as forums or mailing list managers, the tables for those applications will be backed up and transferred with your TXP tables.

Cheers,
Rob

matthew

wrote the following on Friday September 15, 2006

Thank you so much for this information. You probably saved me from a dozen hours of unnecessary work.

The only trouble I had was minor. Some odd characters like those with accent marks (é) were lost in translation. Minor, but something to look out for though…

Kevin

wrote the following on Friday September 15, 2006

Matthew —
I had the same problem, but it affected random posts; I couldn’t detect a pattern on which articles were affected. In fact, there are probably one or two articles left on graphicPUSH that have some funky characters. (Also, it’s worth noting that I saw the anomolies on comments more than articles.)

matthew

wrote the following on Tuesday October 17, 2006

I’m having trouble using this technique on a different host. Local bkups work fine. But bkups from my other host just report, “unable to restore: 1”

if you have any suggestions, i’ve posted this to txp forum.

John Stephens

wrote the following on Wednesday June 4, 2008

Here are a few other things to check on the new server:

1. Navigate to Admin > Preferences > Basic. Verify “Site URL.”
2. Navigate to Admin > Preferences > Advanced. Verify “File directory path” and “Temporary directory path.”
3. Navigate to Extensions > DB Backup; modify “msqldump” and “mysql” paths if needed.
4. Navigate to Extensions > DB Manager, and Repair all tables.
5. Navigate to Admin > Diagnostics. View “Pre-flight check.”
6. Select “View Site.”

nikobe

wrote the following on Tuesday September 29, 2009

Just used this and worked fine though had to use the steps in the above comment from John as well.

Thanks for saving me about half a day of woes.

Colin Leask

wrote the following on Monday May 31, 2010

I have installed the db manager, navigated to the ‘extensions’ page and been welcomed with a message… “Restricted Area”. Can anyone shed a light on what I have done wrong?

add a comment?