iMarket Digital Properties

0 %
iMarket Digital Properties Ltd
Design · Develop · Monetize · Support
  • Location:
    United Kingdom
  • City:
    London
  • Service Area:
    Global
Business Systems
Business Services
24/7 Support
Websites
Web Applications
E-commerce Solutions
Digital Platforms
Products & Services
Public & Private Networks

How To Install WordPress On Ubuntu 14.04

January 4, 2018
https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-14-04If you have not already setup a database, follow the link above for instructions. Otherwise, log in to phpmyadmin and setup a database for the wordpress install.
cd ~

wget http://wordpress.org/latest.tar.gz
extract the files:
tar xzvf latest.tar.gz
thi will create a directory called wordpress in the home directory.
sudo apt-get install php5-gd libssh2-php
cd ~/wordpress
cp wp-config-sample.php wp-config.php
nano wp-config.php
fille in the values for ‘DB_NAME’, ‘DB_USER’ and ‘DB_PASSORD’After you close the file, copy the files to the document root:
sudo rsync -avP ~/wordpress/ /var/www/html/
… or create another directory after /html/ to copy files to a subdirectory. Example:
sudo mkdir /var/www/html/home
then:
sudo rsync -avP ~/wordpress/ /var/www/html/home/
move into the directory:
cd /var/www/html/home
change ownership properties, where user below is the user:
sudo chown -R user:www-data *
manually create the uploads folder beneath the wp-content directory:
mkdir /var/www/html/home/wp-content/uploads
sudo chown -R :www-data /var/www/html/home/wp-content/uploads
Now you can complete the installation by going to the ip address of the install…http://server_dmain_name_or_IPAfter wordpress is installed, we modify apache to allow URL rewrites:
sudo nano /etc/apache2/sites-available/000-default.conf
here we set the ServerName and create a directory section where we allow overrides:
<VirtualHost *:80>
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www/html
      ServerName server_domain_name_or_IP
      <Directory /var/www/html/>
             AllowOverride All
      </Directory>
. . .
sudo a2enmod rewrite
sudo service apache2 restart
create an .htaccess file:
touch /var/www/html/home/.htaccess
sudo chown :www-data /var/www/html/home/.htaccess
chmod 664 /var/www/html/home/.htaccess
Now in wordpress settings, we can got to ‘Settngs’ > ‘Permalinks’ and choose settings as necessary
Posted in TutorialsTags:
2 Comments
  • Stephen

    Can you write a tutorial on how to install nginx on a local server instead of apache?

    12:39 pm August 25, 2017 Reply
    • Yes I will. Actually, if you will be working with nginx on your production site, you should also do the same for your local dev environment (Both local and production servers should be identical). I used this install for 14.04 before 16.04 was released and have yet to update it. I will update this post soon to reflect nginx and ubuntu 16.04. Note that after you have done these steps a few times, it will probably become somewhat tedious to have to type in all of these commands each time you want to spin up a new local server. I will eventually post a tutorial on how to create a vagrant base box where everything is already installed – and you can even share the boxes to others so everyone is working in the same environment.

      1:09 pm August 25, 2017 Reply
Write a comment