Skip to content

Commit 9faec65

Browse files
committed
readme
1 parent 5347287 commit 9faec65

File tree

1 file changed

+47
-22
lines changed

1 file changed

+47
-22
lines changed

README.md

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,43 @@ $ export PATH=~/.local/bin:$PATH
2222
$ export PATH=~/Library/Python/3.4/bin:$PATH
2323
```
2424
###### Windows
25-
Add `%USERPROFILE%\AppData\Roaming\Python\Scripts` to your PATH variable. Search for **Edit environment variables for your account.** in the Start menu.
25+
Add `%USERPROFILE%\AppData\Roaming\Python\Scripts` to your PATH variable. Search for **Edit environment variables for your account** in the Start menu.
2626

2727
If you don't have pip, follow the instructions [here](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html).
2828

29-
## Download and extract WordPress and the configuration files
29+
## Set up your project directory
3030

31-
```
32-
~$ curl https://wordpress.org/wordpress-4.6.1.tar.gz -o wordpress.tar.gz
33-
~$ curl https://github.com/awslabs/eb-php-wordpress/releases/download/v1.0/eb-php-wordpress-v1.zip -o eb-php-wordpress.zip
34-
~$tar -xvf wordpress.tar.gz && mv wordpress wordpress-beanstalk && cd wordpress-beanstalk
35-
~/wordpress-beanstalk$ eb init --platform php7.0 --region us-west-2
36-
~/wordpress-beanstalk$ eb ssh --setup
37-
~/wordpress-beanstalk$ eb create wordpress-beanstalk --sample --database
38-
(choose database username/password, CTRL+C to exit once creation is in-progress)
39-
~/wordpress-beanstalk$ unzip ~/eb-php-wordpress-v1.0.zip
40-
```
31+
1. Download WordPress.
32+
33+
~$ curl https://wordpress.org/wordpress-4.6.1.tar.gz -o wordpress.tar.gz
34+
35+
2. Download the configuration files in this repository
36+
37+
~$ curl https://github.com/awslabs/eb-php-wordpress/releases/download/v1.0/eb-php-wordpress-v1.zip -o eb-php-wordpress.zip
38+
39+
3. Extract WordPress and change the name of the folder
40+
41+
~$ tar -xvf wordpress.tar.gz
42+
~$ mv wordpress wordpress-beanstalk
43+
~$ cd wordpress-beanstalk
44+
45+
4. Extract the configuration files over the WordPress installation
46+
47+
~/wordpress-beanstalk$ unzip ~/eb-php-wordpress-v1.0.zip
48+
49+
## Create an Elastic Beanstalk environment
50+
51+
1. Configure a local EB CLI repository with the PHP platform. Choose a [supported region](http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region) that is close to you.
52+
53+
~/wordpress-beanstalk$ eb init --platform php7.0 --region us-west-2
54+
55+
2. Configure SSH. Create a key that Elastic Beanstalk will assign to the EC2 instances in your environment to allow you to connect to them later. You can also choose an existing key pair if you have the private key locally.
56+
57+
~/wordpress-beanstalk$ eb ssh --setup
58+
59+
3. Create an Elastic Beanstalk environment with a MySQL database.
60+
61+
~/wordpress-beanstalk$ eb create wordpress-beanstalk --sample --database
4162

4263
## Networking configuration
4364
Modify the configuration files in the .ebextensions folder with the IDs of your [default VPC and subnets](https://console.aws.amazon.com/vpc/home#subnets:filter=default), and [your public IP address](https://www.google.com/search?q=what+is+my+ip).
@@ -50,7 +71,7 @@ Deploy the project code to your Elastic Beanstalk environment.
5071

5172
First, confirm that your environment is `Ready` with `eb status`. Environment creation takes about 15 minutes due to the RDS DB instance provisioning time.
5273

53-
```
74+
```Shell
5475
~/wordpress-beanstalk$ eb status
5576
~/wordpress-beanstalk$ eb deploy
5677
```
@@ -59,13 +80,13 @@ First, confirm that your environment is `Ready` with `eb status`. Environment cr
5980

6081
This project includes a configuration file (`loadbalancer-sg.config`) that creates a security group and assigns it to the environment's load balancer, using the IP address that you configured in `ssh.config` to restrict HTTP access on port 80 to connections from your network. Otherwise, an outside party could potentially connect to your site before you have installed WordPress and configured your admin account.
6182

62-
You can [view the related SGs in the EC2 console](https://console.aws.amazon.com/ec2/v2/home#SecurityGroups:search=wordpress-beanstalk)
83+
You can [view the related SGs in the EC2 console](https://console.aws.amazon.com/ec2/v2/home#SecurityGroups:search=wordpress-beanstalk). In the top right corner, choose the region in which you created your environment.
6384

6485
## Install WordPress
6586

6687
Open your site in a browser.
6788

68-
```
89+
```Shell
6990
~/wordpress-beanstalk$ eb open
7091
```
7192

@@ -83,7 +104,7 @@ The hash salt can be any value but shouldn't be stored in source control. Use `e
83104

84105
AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY, NONCE_KEY, AUTH_SALT, SECURE_AUTH_SALT, NONCE_SALT
85106

86-
```
107+
```Shell
87108
~/wordpress-beanstalk$ eb setenv AUTH_KEY=randomnumbersandletters89237492374
88109
~/wordpress-beanstalk$ eb setenv SECURE_AUTH_KEY=ah24h3drfh97623ljkhsdf293t5fghks
89110
...
@@ -92,20 +113,24 @@ The hash salt can be any value but shouldn't be stored in source control. Use `e
92113
Setting the properties on the environment directly by using the EB CLI or console overrides the values in `wordpress.config`.
93114

94115
Remove the custom load balancer configuration to open the site to the Internet.
95-
```
116+
117+
```Shell
96118
~/wordpress-beanstalk$ rm .ebextensions/loadbalancer-sg.config
97119
~/wordpress-beanstalk$ eb deploy
98120
```
99121

100-
When the deployment completes, open the site.
122+
Scale up to run the site on multiple instances for high availability.
123+
```Shell
124+
~/wordpress-beanstalk$ eb scale 3
101125
```
126+
127+
When the update completes, open the site.
128+
129+
```Shell
102130
~/wordpress-beanstalk$ eb open
103131
```
104132

105-
Finally, scale up to run the site on multiple instances for high availability.
106-
```
107-
~/wordpress-beanstalk$ eb scale 3
108-
```
133+
Refresh the site several times to verify that all instances are reading from the EFS file system. Create posts and upload files to confirm functionality.
109134

110135
# Backup
111136

0 commit comments

Comments
 (0)