FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
bash-scripts/wp-cli/https-migrate/migrate.sh at master · VirtuBox/bash-scripts · GitHub
VirtuBox
/
bash-scripts
Public
Notifications
You must be signed in to change notification settings
Fork
13
Star
17
Code
Issues
0
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
bash-scripts
/
wp-cli
/
https-migrate
/
migrate.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (29 loc) · 849 Bytes
Breadcrumbs
bash-scripts
/
wp-cli
/
https-migrate
/
migrate.sh
Copy path
File metadata and controls
35 lines (29 loc) · 849 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/bin/bash
#
check if wp-cli is installed
#
if not, download it
if
[
-z
"
$(
command -v wp
)
"
]
;
then
wget -O wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp
WPCLI=
"
./wp
"
else
WPCLI=
"
wp
"
fi
#
check if wp is-installed
WP_CHECK=
$(
$WPCLI
core is-installed
)
if
[
-z
"
$WP_CHECK
"
]
;
then
SITE_URL=
$(
$WPCLI
option get siteurl
)
SITE_DOMAIN=
$(
$WPCLI
option get siteurl
|
awk -F
"
//
"
'
{print $2}
'
)
#
replace site url with https
$WPCLI
search-replace \
"
$SITE_URL
"
\
"
https://
$SITE_DOMAIN
"
\
--skip-columns=guid --skip-tables=wp_users
#
replace encoded site url with https
$WPCLI
search-replace \
"
http:\/\/
$SITE_DOMAIN
"
\
"
https:\/\/
$SITE_DOMAIN
"
\
--skip-columns=guid --skip-tables=wp_users
else
echo
"
no wordpress instance found
"
exit
1
fi
Back
|
FazBrowse Home
|
New Git URL