Move WordPress site from shared hosting to Amazon EC2

This is a followup post from last week when I moved this blog from shared hosting on to Amazon Web Services EC2 Micro instance.

Basically the steps are straightforward for your old host
1. First is backup all your files
2. Backup the database.

Next series of steps are for the AWS side, first is to create an account
3. Create an account by signing up at and go through all verification to get your account activated.
Read the rest of this entry »

Permissions are too open ‘pem’ Warning! Unprotected Private Key File

I’m planning on taking on a Linux certification exam soon so I’ll be dropping some quick fix and tricks here for notes.

If you are getting an error when trying to SSH to your server with your private key, this means your permissions are too open.

Quick fix enter the following the command line.

#chmod 600 mykeyfile.pem

Import sql dump using the MySQL client

This is useful if you don’t have access to phpmyadmin on your server but have access to ssh and ftp. Or you have a huge sql dump like 10MB or higher that you cannot import directly on phpmyadmin. In my case the phpmyadmin directory was password protected by Apache and I don’t have the right password.

First upload the .sql file on your server using an FTP client and remember the path.

For Linux

for Windows

Login to your server using an SSH client like Putty.

On the command line access MySQL
$> mysql -u username -p password

replace username and password with yours.

On the MySQL client command line access and use your database.
$> use lopaudb;

Now to import your dump;
$> source /home/lopau/mydump.sql;

If successful you should see
Query OK, 13 rows affected (0.00 sec)

That easy.