Wordpress Mobile App

Setting up LAMP WordPress on Amazon AWS EC2 Ubuntu


Because of our earlier exposure to Ubuntu we have been always comfortable working on it because of this when we had to recently setup WordPress site for our customer on Amazon Web Services Ubuntu was the first choice. Most of the content on the web is more for Amazon’s flavour of Unix because of which some steps can become cause problems.


Problems I encountered were:

  • Wrong version of PHP got installed by default PHP apt-get package manager command.
  • Wrong version of MySQL got installed by MySQL default apt-get package manager command.
  • Above things lead to PHP page not showing up on browser.


Although these issues got resolved quite quickly when I found that version incompatibility was the major issue, had to uninstall MySQL & reinstall 5.5 version.


Following commands & steps were followed to complete Apache, MySQL, PHP & WordPress installation:



apt-get install httpd



apt-get install php5-gd

apt-get install apache2 php5 libapache2-mod-php5


Check PHP:

php -r ‘echo “\n\nYour PHP installation is working fine.\n\n\n”;’



apt-get install mysql-server

apt-get install php5-mysql

apt-get install mysql-client-core-5.5


/etc/init.d/mysql status

/etc/init.d/mysql start

/etc/init.d/apache2 restart


MySQL db:

mysql -u root -p



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

tar -xzvf latest.tar.gz

cp ~/wordpress/wp-config-sample.php ~/wordpress/wp-config.php

Add your db details to: ~/wordpress/wp-config.php