How To Install WordPress on Ubuntu (12.04)

(Last Updated On: 2017/11/04)

Local LAMP Installation

WordPress runs on the LAMP (Linux, Apache, MySQL, PHP) stack of applications. First you need to install and configure LAMP.

 sudo apt-get install tasksel
 sudo tasksel install lamp-server


  • (It works!) or
  • http://***** (It works!)

apache restart

sudo /etc/init.d/apache2 restart

Could not reliably determine the server’s fully qualified domain name

sudo nano /etc/apache2/conf.d/fqdn
ServerName localhost

Test php

sudo nano /var/www/testphp.php
add  <?php phpinfo(); ?>

Install phphmyadmin

sudo apt-get install phpmyadmin

mcrypt is missing in phpmyadmin
mv -i /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/
sudo php5enmod mcrypt
sudo service apache2 restart

Use Memcache on Ubuntu

sudo apt-get update
sudo apt-get install mysql-server php5-mysql php5 php5-memcache
sudo apt-get install memcached
sudo apt-get install php-pear
sudo apt-get install build-essential
sudo pecl install memcache
echo “” | sudo tee /etc/php5/conf.d/memcache.ini
ps aux | grep memcache
echo “stats settings” | nc localhost 11211

Install wordpress

sudo apt-get install wordpress
sudo apt-get install libjs-cropper libjs-prototype libjs-scriptaculous libphp-phpmailer libphp-snoopy tinymce
Download WordPress
Copy wordpress /var/www
chown -R www-data /usr/share/wordpress or /var/www/wordpress or /var/www/

Config “WordPress”

sudo nano /etc/apache2/apache2.conf
We need to change AllowOverride None to AllowOverride All in two places.
sudo a2enmod rewrite
service apache2 restart

Install Google mode_PageSpeed

Downloads PageSpeed Module
dpkg -i mod-pagespeed-*.deb
apt-get -f install

Leave a reply

©2016 idStudio &