Sunday, August 25, 2013

working with Wordpress

Just a tips:
I've been working with a WordPress site for a while. In the beginning, it was a easy step to just log in to phpMyAdmin, download a backup of the DB as a sql script, make any changes and if that broke everything I'll just upload the script and everything was back and running...
But, the size of the DB kept growing, the download and upload time kept growing, the hosting had some max limit in upload size... I had to split the script manually in smaller parts, upload several scripts...  Not as easy as it was.

Well, Solution: I made a second DB through phpMyAdmin, and set up the same user access on it.
Now, I make a backup copying from one DB to the other (almos instantly) and doesn't have to download, upload anything.

In phpMyAdmin 3.5.2, with a DB selected go to Menu > Operations > Copy database to:

mark:
   Structure only
X Structure and data
   Data only
   CREATE DATABASE before copying
X Add DROP TABLE / DROP VIEW
X Add AUTO_INCREMENT value
X Add constraints
   Switch to copied database

voilá!
/j