Skip to content

Commit 751a804

Browse files
authored
Merge pull request #52 from creativecommons/staff-migrate
2 parents e82d998 + cd08e26 commit 751a804

File tree

4 files changed

+606
-5
lines changed

4 files changed

+606
-5
lines changed

.env.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# WordPress variables
2-
WP_VERSION=6.3.1
2+
WP_VERSION=6.3
33

44
# Setup WordPress variables
55
WP_ADMIN_EMAIL=

README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,17 @@ containers:
101101
```shell
102102
./setup-wordpress.sh
103103
```
104-
7. Optionally: manually activate/configure `wordfence` in the GUI for now.
105-
- **TODO:** automate in script
104+
7. _Optional (CC staff only):_ import production data
105+
1. Ensure you have access to the production server and your local machine
106+
is properly configured to access it
107+
2. Pull production data
108+
```shell
109+
./staff_migrate.sh pull
110+
```
111+
3. Import production data
112+
```shell
113+
./staff_migrate.sh import
114+
```
106115
107116
108117
## Path URLs
@@ -156,7 +165,7 @@ See [`config/web-sites-available/000-default.conf`][dev-webconfig].
156165
157166
| Name | Version |
158167
| --------- | ------- |
159-
| WordPress | `6.3.1` |
168+
| WordPress | `6.3` |
160169
161170
Also see [`.env.example`](.env.example).
162171
@@ -192,7 +201,7 @@ Also see [`config/composer/composer.json`](config/composer/composer.json).
192201
193202
| Name | Version |
194203
| ------------------------------------ | -------- |
195-
| [Vocabulary Theme][gh-vocab-theme] | `1.1` |
204+
| [Vocabulary Theme][gh-vocab-theme] | `1.1` |
196205
197206
Also see [`config/composer/composer.json`](config/composer/composer.json).
198207

setup-wordpress.sh

+22
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ PLUGINS_DEACTIVATE='
5656
google-analytics-for-wordpress
5757
wordfence
5858
'
59+
PLUGINS_UNINSTALL='
60+
hello
61+
'
5962
THEMES_ACTIVATE='
6063
vocabulary-theme
6164
'
@@ -314,6 +317,24 @@ remove_themes() {
314317
}
315318

316319

320+
uninstall_plugins() {
321+
local _bold _plugin _reset
322+
header 'Uninstall plugins'
323+
for _plugin in ${PLUGINS_UNINSTALL}
324+
do
325+
if wpcli --no-color --quiet plugin is-installed "${_plugin}" \
326+
&> /dev/null
327+
then
328+
wpcli plugin uninstall "${_plugin}"
329+
else
330+
no_op "${_plugin} is not installed"
331+
fi
332+
done
333+
echo
334+
}
335+
336+
337+
317338
update_options() {
318339
local _date_format _default_comment_status _noop _permalink_structure \
319340
_time_format
@@ -389,6 +410,7 @@ composer_install
389410
install_wordpress
390411
update_options
391412
remove_themes
413+
uninstall_plugins
392414
deactivate_plugins
393415
activate_plugins
394416
list_plugins

0 commit comments

Comments
 (0)