Search Our Database
How to install WordPress in Ubuntu
You need to have a LAMP ready server to install WordPress into your Ubuntu server. Read more: How to Setup LAMP Configuration on Ubuntu.
Step 1 – You need to create a database and user account in MySQL for WordPress. Login to your MySQL using the username and password created earlier by running the command below:
sudo mysql -u root -p
Step 2 – After you have successfully logged in, you can now create a database, a new user and its password. ALL MySQL commands MUST end with a semicolon.
To create a database:
To create a new user:
To create a password for the user:
Step 3 – You can then grant the user all privileges for the database by running the command below:
Step 4 – Flush to refresh MySQL and its configuration. You have now successfully created a database for WordPress use.
mysql> Flush Privileges;
Step 5 – Download the latest WordPress installation file into /usr/local/src and extract them. If you do not have wget installed in your server, you can do so by running “yum install wget“.
cd /usr/local/src sudo wget http://wordpress.org/latest.tar.gz sudo tar -zxvf latest.tar.gz
Step 6 – Edit WordPress’s config file to link the MySQL database that we have created earlier to the WordPress CMS.
cd /usr/local/src/wordpress sudo cp wp-config-sample.php wp-config.php sudo vi wp-config.php
Step 7 – Copy all WordPress files into the httpd root folder.
sudo cp -r /usr/local/src/wordpress/* /var/www/
Step 8 – We have to install an additional Php module.
sudo apt-get install php5-gd
Step 9 – Restart the Apache service.
sudo service apache2 restart
Now you can access your WordPress by typing http://your-ip-address-here into your browser’s address bar.