How to Install WordPress On AWS EC2 Instance


WordPress is open source platform which is used for the Content Management System(CMS) based on PHP and MySQL. It also helps you to create your website in the way you want to create it. Under the different category it provides different templates for each category such as Online Grocery Store , Technology, Education, Lifestyle etc. WordPress is one of the most easiest and popular website management & blogging system used on the web

Note: First of all we need Lamp Server for WordPress Installation.Before going ahead you have to learn how to create LAMP server using below link.


Step 1. Update Packages.

# apt-get update

Step 2. We have to create a Database for WordPress.For this fire  following command from your terminal.

# mysql -u root -p
# CREATE USER ‘wpuser’@’localhost’ IDENTIFIED BY ‘wppas’;
# GRANT ALL PRIVILEGES ON wpdata.* TO [email protected];
# exit

Step 3. 
Restart Webserver and mysql.

# service apache2 restart

# service mysql restart

Step 4. For Installing a WordPress we need WordPress package & change below settings also.

# wget
# unzip -q -d /var/www/
# chown -R www-data.www-data /var/www/wordpress
# chmod -R 755 /var/www/wordpress
# mkdir -p /var/www/wordpress/wp-content/uploads
# chown -R www-data.www-data /var/www/wordpress/wp-content/uploads

Step 5.
Copy wp-config-sample.php file to wp-config.php.

# cd /var/www/wordpress/
# cp wp-config-sample.php wp-config.php

Step 6.
We need to tell WordPress how to access the mysql database.For this edit the following settings in WordPress configuration file.

# vim wp-config.php

Wordpress conf file pic

Step 7. Now open your Browser and type below link.


Step 8.
Now WordPress Installation page will open.Select Language English(United States) & Click on Continue.

Wordpress installation page1 pic

Step 9. Set following information according to your requirements & provide password for your WordPress.Now Click on Install WordPress.

Wordpress installation info page pic

Step 10. Click on Log In.

Wordpress login page

Step 11. Enter Username and Password which you set at the installation time & Click on Log In.

Wordpress login page1

Step 12. Now you are succussfully LogIn in your WordPress.

Wordpress main page pic