2
2
3
3
This is a small command line tool for downloading and configuring
4
4
WordPress for Google Cloud Platform. The script allows you to create a
5
- working WordPress project for
6
- [ App Engine standard environment] [ appengine-standard ] or
5
+ working WordPress project for the
6
+ [ App Engine standard environment] [ appengine-standard ] or the
7
7
[ App Engine flexible environment] [ appengine-flexible ] .
8
8
9
9
## Common Prerequisites
10
10
11
11
* Install [ Composer] [ composer ]
12
- * Create a new Cloud Project on [ Developers Console] [ dev -console]
12
+ * Create a new Cloud Project using the [ Cloud Console] [ cloud -console]
13
13
* Enable Billing on that project
14
14
* [ Enable Cloud SQL API] [ cloud-sql-api-enable ] (For App Engine flexible environment)
15
- * Create App Engine default bucket at [ App Engine Setting Page] [ app-engine-setting ]
15
+ * Create App Engine default bucket at [ App Engine Settings Page] [ app-engine-setting ]
16
16
* Install [ Google Cloud SDK] [ gcloud-sdk ]
17
17
18
18
## Prerequisites for standard environment only
@@ -40,25 +40,25 @@ $ gsutil defacl ch -u AllUsers:R gs://YOUR_PROJECT_ID.appspot.com
40
40
41
41
## Create and configure a Cloud SQL instance
42
42
43
- If you will use App Engine flexible environment, create a Cloud SQL
44
- 2nd generation instance, and if you will use App Engine standard
43
+ If you will use the App Engine flexible environment, create a Cloud SQL
44
+ 2nd generation instance, and if you will use the App Engine standard
45
45
environment, create a Cloud SQL 1st generation instance.
46
46
47
- In this guide, we use ` wp ` for various resource names; the instance
47
+ In this guide, we use ` wp ` for various resource names: the instance
48
48
name, the database name, and the user name.
49
49
50
- ### Create and configure a Cloud SQL 1st generation instance(for standard environment)
50
+ ### Create and configure a Cloud SQL 1st generation instance (for the standard environment)
51
51
52
52
Go to the [ SQL settings in the Cloud Console] [ sql-settings ] and create
53
53
an instance ` wp ` and database named ` wp ` . Go to the Access Control ->
54
54
Users, then change the password for ` root@localhost ` . You will use
55
- this password for accessing from App Engine application.
55
+ this password for accessing Cloud SQL from your App Engine application.
56
56
57
57
Also create the ` wp ` database in the local mysql server. The local
58
- mysql instance is required to run ` wp-cli ` tool for
58
+ mysql instance is required to run the ` wp-cli ` tool for
59
59
installing/upgrading plugins and themes.
60
60
61
- ### Create and configure a Cloud SQL 2nd generation instance(for flexible environment)
61
+ ### Create and configure a Cloud SQL 2nd generation instance (for the flexible environment)
62
62
63
63
You can create a new Cloud SQL Second Generation instance with the
64
64
following command:
@@ -76,11 +76,11 @@ $ gcloud sql instances set-root-password wp \
76
76
--password YOUR_INSTANCE_ROOT_PASSWORD # Don't use this password!
77
77
```
78
78
79
- To access this MySQL instance, we’ll use Cloud SQL Proxy. Please
80
- download an appropriate binary from
81
- [ the download page] [ cloud-sql-proxy-download ] , make it executable.
79
+ To access this MySQL instance, use Cloud SQL Proxy.
80
+ Download an appropriate binary from
81
+ [ the download page] [ cloud-sql-proxy-download ] and make it executable.
82
82
83
- If you haven’t created a service account for the project, please
83
+ If you haven’t created a service account for the project,
84
84
create it on [ the Credentials section] [ credentials-section ] in the
85
85
Console (Choose a new service account). Download the JSON key file and
86
86
save it in a secure place.
@@ -94,8 +94,8 @@ $ cloud_sql_proxy \
94
94
-credential_file=PATH_TO_YOUR_SERVICE_ACCOUNT_JSON
95
95
```
96
96
97
- Now you can access to the Cloud SQL instance with the normal MySQL
98
- client. Please create a new database and a user as follows:
97
+ Now you can access the Cloud SQL instance with the normal MySQL
98
+ client. Create a new database and a user as follows:
99
99
100
100
```
101
101
$ mysql -h 127.0.0.1 -u root -p
@@ -106,8 +106,6 @@ mysql> exit
106
106
Bye
107
107
```
108
108
109
- In the above example, I created a new database wp and a new user wp.
110
-
111
109
## How to use
112
110
113
111
First install the dependencies in this directory as follows:
@@ -147,7 +145,7 @@ $ vendor/bin/wp(.bat) server --path=wordpress
147
145
148
146
Then access http://localhost:8080/ . Follow the installation steps,
149
147
create the admin user and its password. Login to the Dashboard and
150
- update if any of the plugins have update .
148
+ update if any of the plugins have updates .
151
149
152
150
Now it’s ready for the first deployment.
153
151
@@ -163,15 +161,15 @@ $ gcloud app deploy \
163
161
Then access your site, and continue the installation step. The URL is:
164
162
https://PROJECT_ID.appspot.com/
165
163
166
- Go to the Dashboard, and in the Plugins page, activate the following
164
+ Go to the Dashboard. On the Plugins page, activate the following
167
165
plugins:
168
166
169
167
170
- - For standard environment
168
+ - For the standard environment
171
169
- App Engine WordPress plugin (also set the e-mail address in its
172
- setting page)
170
+ settings page)
173
171
- Batcache Manager
174
- - For flexible environment
172
+ - For the flexible environment
175
173
- Batcache Manager
176
174
- GCS media plugin
177
175
@@ -220,8 +218,8 @@ update the config file manually in that case.
220
218
221
219
### Update the base image
222
220
223
- We sometimes release the security update for
224
- [ the php-docker image] [ php-docker ] . Then you’ll have to re-deploy your
221
+ We sometimes release a security update for
222
+ [ the php-docker image] [ php-docker ] . You have to re-deploy your
225
223
WordPress instance to get the security update.
226
224
227
225
Enjoy your WordPress installation!
@@ -231,7 +229,7 @@ Enjoy your WordPress installation!
231
229
[ sql-settings ] : https://console.cloud.google.com/sql/instances
232
230
[ memcache-dashboard ] : https://console.cloud.google.com/appengine/memcache
233
231
[ composer ] : https://getcomposer.org/
234
- [ dev -console] : https://console.cloud.google.com/
232
+ [ cloud -console] : https://console.cloud.google.com/
235
233
[ cloud-sql-api-enable ] : https://console.cloud.google.com/flows/enableapi?apiid=sqladmin
236
234
[ app-engine-setting ] : https://console.cloud.google.com/appengine/settings
237
235
[ gcloud-sdk ] : https://cloud.google.com/sdk/
0 commit comments