Install WordPress on Ubuntu 14.04 LTS Server x64

Installing WordPress on Linux is NOT a five minute install…

Generic setup of server

  • Clean install Ubuntu 14.04.02 LTS Server
  • I know it’s not recommended, but makes life much easier — install Ubuntu Desktop
    • sudo apt-get install –no-install-recommends ubuntu-desktop
  • Install the tool that allows you to shutdown/reboot from the top right corner (gear)
    • sudo apt-get install indicator-session
  • Install the gcc compiler
    • sudo apt-get install gcc
    • sudo apt-get install build-essentials

Set up of XAMPP

For this demo, I’m using version 5.6.11 / PHP 5.6.11

  • On the same machine, bring up your browser and go to http://localhost to confirm web server is running
  • The first word in this column is your username; let’s say it’s george, and we want george to be able to edit the webpages
    • sudo chown -R george:george /opt/lampp/htdocs/
  • Now only root can modify the website — a bad practice.  Let’s change the permissions so we can edit the web sites.  Just in case you don’t know the username you’re logged in as, issue this command
    • who am i
  • Stop being superuser (Prompt should go back to being a $)
    • exit
  • Follow he prompts (or next->next->next… until Finish>
  • Execute the script
    • ./xampp-linux-x64-5.6.11-0-installer.run
  • Use the substitute user command to become root (superuser).  Prompt will change from $ to #
    • sudo su
  • Make the script have full permissions
    •  sudo chmod 777 -R xampp-linux-x64-1.8.3-4-installer.run
  • Click on the top left icon and type terminal (This will be forever useful; right click on the icon and lock it to the launcher)
  • Change to the Downloads directory
    • cd ~/Downloads
  •  BEFORE YOU DO ANYTHING ELSE TURN ON THE FIREWALL
    • sudo ufw enable
  • Restart your computer and confirm you CANNOT reach http://youripaddress from another computer — this confirms firewall is running
  • Allow normal/unsecured browser traffic to come in and reboot
    • sudo ufw allow 80/tcp 
  • Set up XAMPP to start when computer is restarted
    • sudo nano /etc/rc.local
  • add the following to the end, but before exit 0
    • /opt/lampp/lampp start
  • Ctrl-X to save, yes, now reboot and confirm you can access the web server
    • sudo reboot
  • We want the graphical interface to XAMPP
    • sudo apt-get install python-glade2
    • sudo /opt/lampp/share/xampp-control-panel/xampp-control-panel &

Setup of Database

  • Install the mysql client
    • sudo apt-get install mysql-client-core-5.6
  • Create the database we need for WordPress.  (replace database, username and password with your values)
    • /opt/lampp/bin/mysql -u root
      • CREATE DATABASE database;GRANT ALL PRIVILEGES ON database.*  TO “username”@”localhost” IDENTIFIED BY “password”;

        FLUSH PRIVILEGES;
        EXIT

    • Go to the phpMyAdmin interface and confirm new database exists

Setup of WordPress

  • Download the latest tar.gz file from http://wordpress.org
  • Move the downloaded files to the htdocs directory
  • mv ~/Downloads/wordpress-4.2.3.tar.gz /opt/lampp/htdocs/
  • cd /opt/lampp/htdocs
  • tar -xvf wordpress-4.2.3.tar.gz
  • mv wordpress <newdir>
  • cp <newdir>/wp-config-sample.php <newdir>/wp-config.php
  • nano ./<webdir>/wp-config.php
    <<update configuration with your database info>>
  • Enter the final configuration by going to the website
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s