-
Notifications
You must be signed in to change notification settings - Fork 2
/
remove-hetzner.sh
46 lines (31 loc) · 1.04 KB
/
remove-hetzner.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
readonly OOISVER="1.0.2"
readonly OOIS="oOWeb-WP-Migration-Script $OOISVER"
### SET WP DOCROOT ###
WPDOCROOT=/12345.onofficeweb.com/htdocs/ # required
### /SET ###
### SET SOME DIRECTORIES AND PARAMETERS ###
RUNDIR=$(pwd)
ACCOUNTNR=${USER##*\-}
ACCOUNTDIR=/www/htdocs/$ACCOUNTNR
PLUGINSTOKILL="hello akismet login-lockdown wp-rocket w3-total-cache patch-plugin"
THEMESTOKILL="twentyfifteen twentysixteen twentyseventeen twentynineteen twentytwenty"
### /SET ###
clear
cd $ACCOUNTDIR$WPDOCROOT
wp option update admin_email [email protected]
wp config delete FS_METHOD
wp config delete automatic_updater_disabled
wp config delete WP_MAX_MEMORY_LIMIT
wp config delete WP_MEMORY_LIMIT
wp config delete WP_CACHE
wp config delete DISABLE_WP_CRON
wp option update timezone_string "Europe/Berlin"
wp plugin deactivate $PLUGINSTOKILL
wp plugin delete $PLUGINSTOKILL
wp theme delete $THEMESTOKILL
rm ./wp-content/wp-rocket-config/ -r
rm ./wp-content/w3tc-config/ -r
rm ./wp-content/mu-plugins/ -r
rm ./wp-content/advanced-cache.php
cd $RUNDIR