× Toggle menu

How To Install Wordpress on Ubuntu 14.04

Codeanywhere introduced DevBoxes a while back, which are in essence your own private virtual development environment that you can fully customize. Since then we have got inquiries from users how to set up different types of frameworks on them, so this is just the first of a series of How To Tutorials. These tutorials are specifically designed for use on Codeanywhere’s DevBoxes, but will for the most part work anywhere.

What is Wordpress

Wordpress is a free and open-source blogging tool and a content management system based on PHP and MySQL. WordPress was used by more than 23.3% of the top 10 million websites as of January 2015. It is the most popular blogging system in use on the Web, at more than 60 million websites.


Before we get started on installing Wordpress there are a few prerequisites. You have to create a DevBox with the Ubuntu PHP Stack (MySQL, PHP, phpmyAdmin) or if you are doing this on your own server then make sure that you have LAMP installed. If you don't have the Linux, Apache, MySQL, PHP installed please do that first.

Now that you have that done you can start setting up Wordpress.

Wordpress Installation

To download the installation file you can use command line and type

wget http://wordpress.org/latest.tar.gz

or you can download it from wordpress.org and upload to your DevBox.

Next, to extract the installation from gzip tarball type ( note: this will extract Wordpress to the current folder, make sure you extract to ~/workspace/):

tar xzvf latest.tar.gz

Afterwards remove the unnecessary files

rm latest.tar.gz

Change permissions on the extracted wordpress folder
#Devbox’s VM_USERNAME is cabox

chown vm_username : vm_username wordpress

Setup the Database

In your browser, type http://server_domain/phpmyadmin or for DevBoxes
enter http://port-80.DevBoxName.box.codeanywhere.com/phpmyadmin #DevBoxName listed in Box Info

Type in your Username and Password
#Devbox’s phpmyadmin user is root and has no password

Click on Databases

In the textbox enter Database_Name
#Devbox’s name is Wordpress.

Next on dropdown select: utf8_general_ci and click Create.

Wordpress Configuration

Now that you are done with seting up the Database you can now setup your Wordpress Configuration.
First open the file named wp-config-sample.php (located in the root install-directory) and enter the following values:

define('DB_NAME', 'Database_name'); # Devbox default is WordPress
define('DB_USER', 'database_username'); # Devbox default is wordpressuser
define('DB_PASSWORD', 'database_pasword'); # default DB user wordpressuser has no password, change if necessary

Lastly in the same file, at the very bottom you must paste the lines below to enable FTP communication from within PHP (required for updating plugins):

/** FTP fix */
define('FS_METHOD', 'direct');

Save the file as wp-config.php and close it.

Folder Permission

The last and final thing you need to do to complete your installation is to set the folder permissions. To do this, open up your command line and type:

sudo find . -type f -exec chmod 664 {} +
sudo find . -type d -exec chmod 775 {} +
sudo chown -R vm_username:www-data ~/workspace

Start Blogging

Once all of this is finished, your online installation page will be accessable via your browser. Type http://server_domain/wp-admin/install.php or for DevBoxes
enter http://port-80.DevBox_name.box.codeanywhere.com/wp-admin/install.php #DevBox_name listed in Box Info.

Now fill out the short online form and start blogging!

Ready to start coding from anywhere?

Join the growing community of over ... businesses and professionals that already use Codeanywhere on a daily basis, and you can start coding from anywhere for free.

Sign up for free