Skip to content

Commit fc878b2

Browse files
authored
Updates wordpress sample to use wp-gae in cloud-tools package (GoogleCloudPlatform#821)
1 parent 1f41f5c commit fc878b2

File tree

11 files changed

+13
-452
lines changed

11 files changed

+13
-452
lines changed

appengine/php72/wordpress/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
This is a simple command-line tool for downloading and configuring
44
WordPress on App Engine Standard for PHP 7.2.
5+
56
## Common Prerequisites
67

78
* Create a new Cloud Project using the [Cloud Console][cloud-console]
@@ -43,7 +44,7 @@ command:
4344

4445
## Create or Update a WordPress project for App Engine
4546

46-
The `wordpress.php` command provides a convenient way for you to either create
47+
The `wp-gae` command provides a convenient way for you to either create
4748
a new WordPress project or add the required configuration to an existing one.
4849

4950
### Setup
@@ -65,7 +66,7 @@ a new WordPress project or add the required configuration to an existing one.
6566
To download WordPress and set it up for Google Cloud, run the `create` command:
6667

6768
```sh
68-
$ php wordpress.php create
69+
$ php vendor/bin/wp-gae create
6970
```
7071

7172
The command asks you several questions, please answer them. Then you'll have a
@@ -80,16 +81,16 @@ If you are migrating an existing project to Google Cloud, you can use the
8081
`update` command:
8182
8283
```sh
83-
$ php wordpress.php update path/to/your-wordpress-site
84+
$ php vendor/bin/wp-gae update path/to/your-wordpress-site
8485
```
8586
86-
The command asks you several questions, please answer them. This will copy the
87-
files in the [`files`](files/) directory and write the proper configuration.
88-
Then your WordPress project will be ready to deploy to Google Cloud!
87+
The command asks you several questions, please answer them. This will copy
88+
[a few files][wp-gcp-files] and write the proper configuration. Then your
89+
WordPress project will be ready to deploy to Google Cloud!
8990
9091
## Deploy to Google Cloud
9192
92-
`cd` into the root of your WordPress project.
93+
`cd` into the root of your WordPress project.
9394
9495
```sh
9596
$ cd my-wordpress-project
@@ -208,3 +209,4 @@ the production environment.
208209
[cloud-sql-proxy-download]: https://cloud.google.com/sql/docs/mysql/connect-external-app#install
209210
[credentials-section]: https://console.cloud.google.com/apis/credentials/
210211
[gcs-plugin]: https://wordpress.org/plugins/gcs/
212+
[wp-gcp-files]: https://github.com/GoogleCloudPlatform/php-tools/tree/master/src/Utils/WordPress/files

appengine/php72/wordpress/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"ext-phar": "*",
44
"ext-zip": "*",
55
"paragonie/random_compat": "^1.3",
6-
"symfony/console": "^3.0",
7-
"google/cloud-tools": "^0.8.5"
6+
"google/cloud-tools": "^0.9.0"
87
},
98
"require-dev": {
109
"phpunit/phpunit": "^5"

appengine/php72/wordpress/files/.gcloudignore

Lines changed: 0 additions & 18 deletions
This file was deleted.

appengine/php72/wordpress/files/app.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

appengine/php72/wordpress/files/cron.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

appengine/php72/wordpress/files/gae-app.php

Lines changed: 0 additions & 53 deletions
This file was deleted.

appengine/php72/wordpress/files/php.ini

Lines changed: 0 additions & 9 deletions
This file was deleted.

appengine/php72/wordpress/files/wp-config.php

Lines changed: 0 additions & 122 deletions
This file was deleted.

appengine/php72/wordpress/test/DeployTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@
1919

2020
use Google\Cloud\TestUtils\AppEngineDeploymentTrait;
2121
use Google\Cloud\TestUtils\ExecuteCommandTrait;
22+
use PHPUnit\Framework\TestCase;
2223

23-
class DeployTest extends \PHPUnit_Framework_TestCase
24+
class DeployTest extends TestCase
2425
{
2526
use ExecuteCommandTrait;
2627
use AppEngineDeploymentTrait;
2728

28-
private static $commandFile = __DIR__ . '/../wordpress.php';
29+
private static $commandFile = __DIR__ . '/../vendor/bin/wp-gae';
2930

3031
public static function beforeDeploy()
3132
{

0 commit comments

Comments
 (0)