This article will teach you how to install wordpress on Ubuntu 14.04 with Apache and Mysql server.
You will need the wordpress files that you can freely download at https://wordpress.org/download/.
The tutorial will assume that:
Login to your mysql server using the command:
mysql -u root -p
Then create a database by following the commands. For this tutorial we will create a database named "orders_newdatabasename" with a user "orders_dbuser" and password of "mynewpassword".
You will have to write down this information since we will use it later on.
CREATE DATABASE wordpress_sample;
CREATE USER wp_user@localhost IDENTIFIED BY 'wp_password';
GRANT ALL PRIVILEGES ON wordpress_sample.* TO wp_user@localhost;
Flush all privileges to re-read the users files:
then exit mysql:
To install wordpress we have to download the latest wordpress source from their website at https://wordpress.org, but before doing that we have to nagivate to the /html folder first where we will download our Wordpress zip file.
and download the latest wordpress files:
Now, we have to install unzip to unpack our wordpress files:
apt-get install unzip
Unzip the wordpress files in the /var/www/html directory:
unzip -q latest.zip
And then we set the appropriate permissions for the directory:
chown -R www-data:www-data /var/www/html/wordpress
chmod -R 755 /var/www/html/wordpress
Then we will need to create an /upload directory beneath /wp-content folder so we can make contents and upload files into it.
mkdir -p /var/www/html/wordpress/wp-content/uploads
Finally, we will need to allow the web server to read and write to this directory. we will have to assign user and group ownership to the files, we can do that by:
chown -R www-data:www-data /var/www/html/wordpress/wp-content/uploads
Yes! wordpress is installed, now we have to configure our wordpress so we can actually use it.
To configure wordpress on Ubuntu, go to your favorite web browser and head to the address of your server. My server address is 10.10.45.52 so I will go ahead to http://10.10.45.52/wordpress/.
You will see the wordpress configuration page, first up is the language configuration. From here you can select which language you prefer.
Next, you will have to enter your database information. The information that you wrote download when creating a database will be used here.
If the database information you entered is correct, wordpress will inform you that it can now communicate with the database. If not, you will have to enter the database information again while making sure all information is correct.
Once your database details are confirmed to be correct wordpress will ask you some information such as your site title, your administrator username and password.
If all is good and no errors occur you can now login to the Wordpress administration area to add your theme, plugins and more users.
Thats all of it! I hope you learned a lot on this tutorial and if ever you have some questions or some ideas you can share please do not hesitate to comment below.