Migrating WordPress
Contents
To migrate WordPress, we basically need to do two things:
- Migrate MySQL Database
- Migrate WordPress files
- Change DNS Record
Migrate MySQL Database
First, let’s backup the DB. The easiest way to do this is using WP-DB Manager. Install this extension first if you don’t have it.
Once you backup it, use FileZilla to retrive the backup file. Because we are going to import the .sql file to database we created in step 4, it important to add this at the beginning of the file:
use wordpress;
Save the .sql file and then transfer it to our EC2 instance (put it in /tmp/ folder).
Now, in Putty, let’s import the backup file into MySQL.
mysql -u wp_user -p < /tmp/1348812291_-_wordpress.sql
Migrate WordPress files
First let’s create the directory to store the WordPress files
mkdir /var/www mkdir /var/www/sodeve.net/ mkdir /var/www/sodeve.net/public chown nginx:nginx /var/www/sodeve.net/public
Now we can copy all files from the old WordPress site at GoDaddy’s into our EC2 instance
Change DNS Record
To host our DNS we need to move our NameServers address to CloudFlare’s NameServers. First, login to your GoDaddy Domain Control Panel.
Click Set Nameservers and change the name servers to:
- DAVE.NS.CLOUDFLARE.COM
- PAM.NS.CLOUDFLARE.COM
Setting up DNS in CloudFlare is really simple so I’ll give it a pass. 😀
Alright, that’s basically all you need to do to migrate your blog from GoDaddy’s shared host to Amazon EC2.
I hope it helps. If you encountered problem following this example, please drop a comment or two below.
Cheers!
loading...
About Hardono
Incoming Search
linux, nginx, ubuntu, wordpress