You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this cert is not working, try restarting your MAC, however there might be a less drastic way of making this work.
67
+
If this cert is not working, try refreshing the Keychain or verifying the certificate installation before considering a Mac restart as a last resort.
50
68
:::
51
69
52
70
::: warning
53
-
WordPress will now run on localhost port 443, which is exactly the same port that Kubernetes runs on. Therefore local Kubernetes and WordPress can't be running at the same time.
71
+
WordPress will now run on localhost port 443, which is exactly the same port that Kubernetes runs on. Therefore, local Kubernetes and WordPress can't be running at the same time.
54
72
:::
55
73
56
74
## Run Docker compose
@@ -70,18 +88,31 @@ docker compose up --build
70
88
wp_start
71
89
```
72
90
91
+
- ensure that the wp-cli container backs up the latest WP Database
92
+
- You should see the following in the terminal:
93
+
94
+
```shell:no-line-numbers
95
+
...
96
+
wp-cli-1 | *** Backing up Database in case of disaster ***
97
+
wp-cli-1 | Success: Exported to '/tmp/WordPress/all-sites-<yyyy-mm-dd>.sql'.
98
+
# (This should be accessible to ~/tmp/WordPress)
99
+
...
100
+
```
101
+
73
102
- Access Wordpress at [https://localhost](https://localhost)
74
-
- Access PHPMyAdmin at [http://localhost:8081](http:/localhost:8081) (Note: does not use https)
103
+
- Access PHPMyAdmin at [http://localhost:8081](http://localhost:8081) (Note: does not use https)
75
104
76
-
When you access Wordpress local for the first time, you will be prompted with the intial setup. You can use this screenshot for reference for what to enter.
105
+
When you access Wordpress local for the first time, you will be prompted with the initial setup. You can use this screenshot for reference for what to enter.
- The WordPress wp-content directory can be found at the path specified in your `.env` file under the `CONTENT_DIR` variable.
129
+
130
+
## Running Thereafter
98
131
99
132
-`docker compose up` runs the nginx, db, WordPress php-fpm, and wp-cli containers, this will also output debug.log in the stdout.
100
133
101
134
- WordPress wp-content directory, can be found at the path specified in your `.env` under variable `CONTENT_DIR`, .
102
135
103
-
## Helper functions.
136
+
## Helper functions
104
137
105
138
The [Helper functions](./bin/commands.sh) can be linked to run anytime a new terminal window is open by adding it to your `~/.bash_profile`
106
139
107
-
### Including helper functions in bash profile.
140
+
### Including helper functions in bash profile
108
141
109
142
::: tip
110
143
In order to make the helper functions accessible you need to include them into your bash or zsh profile. These commands then can be run from anywhere on your file system from a terminal window.
111
144
:::
112
145
113
-
If you are using bash add this to your `~/.bash_profile`
146
+
If you are using bash, add this to your `~/.bash_profile`.
147
+
If you are using Zsh, add this to your `~/.zshrc`.
114
148
115
149
```bash
116
150
if [ -f /location-of-this-repo/wordpress/dev/bin/commands.sh ] ;then
@@ -164,16 +198,15 @@ If a plugin has been configured to use this method of unit testing, we can run t
164
198
165
199
The WordPress Docker instance must be up and running to use the `wp_setup_tests` or `wp_test` commands (run `wp_start` to start the Docker instance).
166
200
167
-
### Setup
201
+
### Testing Setup
168
202
169
203
To set up the WP testing environment inside the WordPress container, run the command `wp_setup_tests` from anywhere.
170
204
171
205
If you get an error saying `command not found: wp_setup_tests`, follow the steps in the "Helper functions" section above.
172
206
173
207
### Running tests
174
208
175
-
To run a test:
176
-
1. Navigate to the plugin you want to execute tests on.
177
-
2. Run the command `wp_test`.
209
+
1. Navigate to the plugin you want to execute tests on: `cd /path/to/your/plugin-directory`
210
+
2. Run `wp_test`.
178
211
- If you get a message saying "No tests executed" the plugin is most likely not configured using the `wp scaffold plugin-tests` command so its tests cannot be executed this way. Run the unit tests locally instead (`composer run test`).
179
212
- If you get a message saying "Have you run bin/install-wp-tests.sh?" you will need to run the `wp_setup_tests` command, then try again.
0 commit comments