Notes on Migrating WordPress to AWS with Bitnami

Having recently moved several sites, including this one, from GoDaddy to Amazon, I thought I’d share the process that drove me pretty crazy at first. I’m indebted to several other such blog posts whose tutorials pointed the way:

I will assume, for those readers following this post, that you already know how to create an Amazon account, and that you have at least a passing familiarity with (or the ability to look up) Linux command line operations.

The first step is to spin up an Amazon EC2 instance on your account. When you choose your Amazon Machine Image (AMI), you have a huge variety of options, especially for WordPress. I recommend using the 1-click Bitnami WordPress AMI from the AWS Marketplace (I used ami-745af71d for Ubuntu 64-bit – a free, stable release for AWS).

When you launch the instance, you’ll have to assign it a key pair for security. Be sure to save the private key in a safe place, because you only get one shot to download it.

Security Group: SSH by default. Add ports 80 (HTTP), 21 (FTP), and SFTP, and 3306 (MYSQL) access set up.

Assign an Elastic (static) IP address to the instance, so that you can access it from anywhere more easily – but be aware that if you need to shut down the instance, the IP address will release from it, and you’ll have to reassign it. You’ll have to delete or rename bitnami’s IP configuration files (

Open an SSH tunnel to the instance (user: bitnami, key: private key)

Update and upgrade the server if necessary.

Open an FTP connection to the instance (same credentials)

On the old server:

Export your database (including an add-drop tables query) from the old host (This may be through PHPMyAdmin, for example. If you need access to the database, consider installing the WordPress plugin Portable PHPMYAdmin or Database Manager)

Export your WordPress content through the built-in Exporter Tool in WordPress. This will download a specialized XML file.

Copy your wp-content folder in its entirety from the old server via FTP or SCP.

On the new server:

If necessary, install a database management plugin like you did on the old site.

Replace the default bitnami wp-content folder with your backup from the old site via FTP or SCP.

Import your database via PHPmyadmin (or plugin)

Import your content if necessary via the Importer tool (installs like a plugin)

if you have to change file permissions/ownership:

wp-content gets 0775, owner is bitnami, group is daemon.

backup and edit httpd.conf

name of admin, allow override all, include wordpress.conf and virtual hosts.conf


virtual host using name of site, point to wordpress/htdocs document root

backup and edit wordpress.conf

instead of htaccess file

sudo vi /opt/bitnami/apps/wordpress/conf/wordpress.conf

set rewrite mod rules to /wordpress/

 mysql – table wp-options

siteurl and -home to

restart apache and mysql

$ sudo /opt/bitnami/ restart apache
$ sudo /opt/bitnami/ restart mysql

fix breaks:

front-end settings; just put the two sites side by side.
duplicate content from importer, esp. menus
links: esp. relational vs hard links if domain is changing (incld. directory structure e.g. into
images: likely bad links if wp-content and db are both imported
plugins: this is the big one esp. if there are server config tweaks necessary. case by case basis.

dns change: a record

point @ to AWS elastic IP
try to keep old one as cname or subdomain a record

backup and edit wp-config.php to name the site