WordPress is CMS designed for blog publishing, it is powered by PHP and MySQL so it runs perfectly on a LAMP server. If you want an example of what you can do with WordPress look here or just look around this site as it also runs on WordPress.
In this tutorial I’m going to talk you through the instillation process for WordPress on a LAMP server. I’m going to be using the same EC2 instance we setup in my “Setting up a LAMP Server” tutorial, however the steps I’ll go through in this tutorial will work on any LAMP server running a Linux based distribution. Rite so lets begin…
First we need to download WordPress to our server to do this type:
This will download the latest version of WordPress to your server, now extract the zip file with the command:
All the files required for WordPress are now ready, we just need to put them in to your websites folder:
sudo cp -r wordpress/* /var/www/
Once you’ve copied the files to your web server’s directory we need to setup a database for WordPress to use, log-in to your MySQL server and create a new database called wordpress:
mysql -u root -p
mysql> create database wordpress; exit
Now we just need to tell WordPress a few things about our database, navigate to your WordPress root folder (“cd /var/www/”) and edit the config file:
sudo cp wp-config-sample.php wp-config.php sudo nano wp-config.php
Now scroll down till you see
/** The name of the database for WordPress */ define('DB_NAME', 'database_name_here'); /** MySQL database username */ define('DB_USER', 'username_here'); /** MySQL database password */ define('DB_PASSWORD', 'password_here');
and edit it so it looks like:
/** The name of the database for WordPress */ define('DB_NAME', 'wordpress'); /** MySQL database username */ define('DB_USER', 'root'); /** MySQL database password */ define('DB_PASSWORD', 'Your Password');
then save the config file with “Ctrl + O” and “Enter” then exit nano with “Ctrl + X”.
Now your all ready to go to your new wordpress page, to do this just open your web-browser and navigate to your server address, e.g. www.yourdomain.com. You should see the wordpress welcome page:
Site Title: This is title of you new site and will be displayed in the header. Username: This is the admin username you'll use to login to your site, its wise to choose something other then admin password: Enter your password, its highly recommended to use a strong password here. Your Email: Your Email address. Allow My Site...: This is up to you, most people want there site to be found so leave this checked.
Fill in the form and click Install WordPress, it will take a few seconds to install, then you’ll be asked to login using you login details you just entered, and Welcome to your sites Dashboard.
Now if you’ve installed WordPress how do you backup & restore your site or move it to a new server.