Wordpress AWS Part 7 - Deploy Wordpress
An overview of the process.
- Decide of the domain name of the Wordpress, and make it point to the Beanstalk application. In this example, we will be using the name "aws.testquek.tk".
- Deploy Vanilla Wordpress.
- Include the ".ebextensions" folder to automount and symlink the EFS.
- Create and edit "wp-config.php" to include the database details, and also with the keys and salts.
- Change table prefix (optional).
- Deploy (we will be calling the zip file "wordpress-4.8.2-v1.zip").
- Run the installer.
- Modify Wordpress to make it work in AWS.
- SSH in the EC2 instance, check and ensure that the EFS is mounted and sym-linked.
- In EC2 instance, copy contents of "wp-content" folder into EFS, remove "wp-content" folder.
- In EC2 instance, edit "wp-config.php" for new "wp-content" location.
- Test (create post and upload pictures). If OK, proceed.
- Deploy modified Wordpress.
- At local computer, remove "wp-content" folder.
- At local computer, edit "wp-config.php" for new "wp-content" location.
- At local computer, add in ".htaccess" file.
- Include the ".ebextensions" folder to automount and symlink the EFS.
- Deploy (we will be calling the zip file "wordpress-4.8.2-v2.zip").
- Test (check created post and uploaded pictures).
Let's get started.
Decide of the domain name of the Wordpress.
In this example, we are using the name "aws.testquek.tk". To make it point to the Beanstalk, we need to find out the URL of the application (screenshot in
part 5), and then do a CNAME to it.
Deploy Vanilla Wordpress.
 |
Extract Wordpress files in local computer.
Put in ".ebextensions" folder (that will auto-mount and symlink the EFS). |
 |
| Create and edit "wp-config.php" to use the RDS and for the keys and salts. |
 |
| Create the zip file. |
 |
| Deploy the zip file. |
 |
| Run the installer by going to http://aws.testquek.tk. |
 |
| Notice that the installer does not ask for database details. We already specified it in the wp-config.php. |
 |
| Wordpress confirm installed. |
Modify Wordpress to make it work in AWS.
 |
| Create ".htaccess" file. Create the zip file. |
 |
| Deploy. |
 |
| Deploy success. |
 |
| Uploaded picture is still available. |
We took the original Wordpress, made some changes, so that it can work in an AWS environment properly.
Important Note
Wordpress often modifies the files ".htaccess" and "wp-config.php", especially when installing plugins. It is important to be aware of these changes, so that the same changes can be done in the local copy, and be re-deployed as a newer version.
Part 1 - Overview
Part 2 - RDS
Part 3 - EFS
Part 4 - Key Pairs
Part 5 - Beanstalk
Part 6 - ebextensions Folder
Part 7 - Deploy Wordpress
Part 8 - 4000 Concurrent Connections