Install WordPress On Amazon Server

Install WordPress On Amazon Server

We all know allowing WordPress to work on amazon server is not an easy job.This tutorial assumes that you have launched an Amazon Linux instance with a functional web server with PHP and MySQL support.

To download and unzip the WordPress installation package
1.Download the latest WordPress installation package with the wget command. The following command should always download the latest release.

2.Unzip and unarchive the installation package. The installation folder is unzipped to a folder called wordpress.

To create a MySQL user and database for your WordPress installation

1.Start the MySQL server.

2.Log in to the MySQL server as the root user. Enter your MySQL root password when prompted; this may be different than your root system password, or it may even be empty if you have not secured your MySQL server.

3.Create a user and password for your MySQL database. Your WordPress installation uses these values to communicate with your MySQL database. Enter the following command, substituting a unique user name and password.

4.Create your database. Give your database a descriptive, meaningful name, such as wordpress-db.

5.Grant full privileges for your database to the WordPress user that you created earlier.

6.Flush the MySQL privileges to pick up all of your changes.

7.Exit the mysql client.

To create and edit the wp-config.php file

The WordPress installation folder contains a sample configuration file called wp-config-sample.php. In this procedure, you copy this file and edit it to fit your specific configuration.

1.Copy the wp-config-sample.php file to a file called wp-config.php. This creates a new configuration file and keeps the original sample file intact as a backup.

2.Edit the wp-config.php file with your favorite text editor (such as nano or vim) and enter values for your installation. If you do not have a favorite text editor, nano is much easier for beginners to use.

2.1.Find the line that defines DB_NAME and change database_name_here to the database name that you created in Step 4 of To create a MySQL user and database for your WordPress installation.

2.2.Find the line that defines DB_USER and change username_here to the database user that you created in Step 3 of To create a MySQL user and database for your WordPress installation.

2.3.Find the line that defines DB_PASSWORD and change password_here to the strong password that you created in Step 3 of To create a MySQL user and database for your WordPress installation.

2.4.Find the section called Authentication Unique Keys and Salts. These KEY and SALT values provide a layer of encryption to the browser cookies that WordPress users store on their local machines. Basically, adding long, random values here makes your site more secure. Visit https://api.wordpress.org/secret-key/1.1/salt/ to randomly generate a set of key values that you can copy and paste into your wp-config.php file. To paste text into a PuTTY terminal, place the cursor where you want to paste the text and right-click your mouse inside the PuTTY terminal.

For more information about security keys, go to http://codex.wordpress.org/Editing_wp-config.php#Security_Keys.

The values below are for example purposes only; do not use these values for your installation.

2.5.Save the file and exit your text editor.

To install your WordPress files under the Apache document root

1.Now that you’ve unzipped the installation folder, created a MySQL database and user, and customized the WordPress configuration file, you are ready to copy your installation files to your web server document root so you can run the installation script that completes your installation. The location of these files depends on whether you want your WordPress blog to be available at the actual root of your web server (for example, my.public.dns.amazonaws.com) or in a subdirectory or folder under the root (for example, my.public.dns.amazonaws.com/blog).

2.If you want WordPress to run at your document root, copy the contents of the wordpress installation directory (but not the directory itself) as follows:

3.If you want WordPress to run in an alternative directory under the document root, first create that directory, and then copy the files to it. In this example, WordPress will run from the directory blog:

To allow WordPress to use permalinks
WordPress permalinks need to use Apache .htaccess files to work properly, but this is not enabled by default on Amazon Linux. Use this procedure to allow all overrides in the Apache document root.

1. Open the httpd.conf file with your favorite text editor (such as nano or vim). If you do not have a favorite text editor, nano is much easier for beginners to use.

2.Find the section that starts with .

3.Change the AllowOverride None line in the above section to read AllowOverride All.

There are multiple AllowOverride lines in this file; be sure you change the line in the section.

4.Save the file and exit your text editor.

To fix file permissions for the Apache web server
Some of the available features in WordPress require write access to the Apache document root (such as uploading media though the Administration screens). If you have not already done so, apply the following group memberships and permissions (as described in greater detail in the LAMP web server tutorial).

1.Change the file ownership of /var/www and its contents to the apache user.

2.Change the group ownership of /var/www and its contents to the apache group.

3.Change the directory permissions of /var/www and its subdirectories to add group write permissions and to set the group ID on future subdirectories.

4.Recursively change the file permissions of /var/www and its subdirectories to add group write permissions.

5.Restart the Apache web server to pick up the new group and permissions.

To run the WordPress installation script

1.Use the chkconfig command to ensure that the httpd and mysqld services start at every system boot.

2.Verify that the MySQL server (mysqld) is running.

If the mysqld service is not running, start it.

3.Verify that your Apache web server (httpd) is running.

If the httpd service is not running, start it.

4.In a web browser, enter the URL of your WordPress blog (either the public DNS address for your instance, or that address followed by the blog folder). You should see the WordPress installation screen.

5.Enter the remaining installation information into the WordPress installation wizard.

6.Click Install WordPress to complete the installation.

Congratulations, you should now be able to log into your WordPress blog and start posting entries.

If you have any query/suggestion please feel free to contact me.

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *