WordPress on Amazon EC2 – Part 7 – WordPress at last!

A couple of days ago we installed all the software to get WordPress going. Today, we make it come alive for the first time!

MySQL setup

First we need to configure MySQL to have a database

$ mysql -u root -pEnter password: enter your password that you created last time...stuff deleted for clarity...mysql> CREATE DATABASE BlogDB;Query OK, 1 row affected (0.00 sec)mysql> CREATE USER 'BlogUser'@'localhost' IDENTIFIED BY 'another password';Query OK, 0 rows affected (0.00 sec)mysql> GRANT ALL PRIVILEGES ON BlogDB.* TO 'BlogUser'@'localhost';Query OK, 0 rows affected (0.00 sec)mysql> FLUSH PRIVILEGES;Query OK, 0 rows affected (0.00 sec)mysql> exit;Bye

What we did up there is create a new database and a user for that database. That's where WordPress will store all it's data.

Wordpress install

First, let's download WordPress:

wget -P /tmp http://wordpress.org/latest.tar.gz

Next, let's go to the directory we created and expand it out.

$ cd /var/www/yoursite.comsudo tar --strip-components=1 -xvzf /tmp/latest.tar.gzsudo chown apache:apache -R .

This will expand out the WordPress distribution into that directory (tar is a very old-school command; it stands for Tape ARchive even though it's rarely used for tapes in this day and age). The option to --strip-components just removes the "wordpress" directory that would've been created; since we already created the directory last time, we don't need another one.After that we just gave ownership (CHange OWNership) of the directory to Apache.Let's restart Apache for good measure!

$ sudo service httpd restart

WordPress Configuration

Now the fun part!Just go to your web site that you just set up. You should see the WordPress welcome page:From here you should just enter the password you set and you should be good to go!Next, you enter the details of the site you're setting up. Don't worry, you can change this later. In this case you should come up with a different password for your WordPress login. This is what you'll use to log into your site normally.One you fill this out, you should be good to go! You might have to log in with the username and password you created.At this point you can start blogging. Things will likely work, but you'll still need some work to get things optimized for the server. (Even if you have a beefy server, optimization is something you'll need regardless)Next up: Optimization!

Previous
Previous

Motorcycle Packing - Part 1 - Bedding (and bonus: Chair!!)

Next
Next

Close to home