Skip to content

Commit 7c600c2

Browse files
authored
Update ss-install-wordpress-packages.txt
1 parent 9ea86d4 commit 7c600c2

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

bash/ss-install-wordpress-packages.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#### path: /var/www/ss-install-wordpress-packages ##################################################
88
#### destination: n/a (not a boilerplate) ##########################################################
99
#### purpose: Reinstalls the WordPress module packages and non-config files (idempotent) ###########
10-
#### module version: WordPress 6.5.x ###############################################################
10+
#### module version: WordPress 6.7.x ###############################################################
1111
#### sourced by: ss-install ########################################################################
1212
#### bash aliases: ss install wordpress|wp packages ################################################
1313
####################################################################################################
@@ -228,13 +228,13 @@ source "${PATH_SS_INSTALL_WORDPRESS_HOVERCRAFT}"
228228
## minimum wp_options required to avoid /wp-admin/install.php redirect are below: ##
229229
## home/siteurl, blogname, admin_user, admin_email, admin_password ##
230230

231-
# QUERY_PRODUCTION_WP_OPTIONS_EXIST=$(ss_mysql_root --execute "SHOW TABLES FROM ${DB_NAME} WHERE Tables_in_${DB_NAME} LIKE '${DB_PREFIX}options';")
231+
# QUERY_PRODUCTION_WP_OPTIONS_EXIST=$(ss_mysql_user --execute "SHOW TABLES FROM ${DB_NAME} WHERE Tables_in_${DB_NAME} LIKE '${DB_PREFIX}options';")
232232
# GREP_WP_OPTIONS_STRING_PRODUCTION=$(echo "${QUERY_PRODUCTION_WP_OPTIONS_EXIST}" | ss_grep_boolean "${DB_PREFIX}"options)
233233

234234
## populate wp_options if not exists ##
235235
# if [[ -z "${GREP_WP_OPTIONS_STRING_PRODUCTION}" ]]; then
236236
# /usr/bin/php -qCr "include '/var/www/html/wp-admin/install.php'; wp_install('SlickStack', '\"${SFTP_USER}\"', '\"${SFTP_USER}\"@\"${SITE_DOMAIN_EXCLUDING_WWW}\"', 1, '', \"${SFTP_PASSWORD}\", 'en_US');"
237-
# ss_mysql_root --execute="UPDATE ${DB_PREFIX}options SET option_value='Lightning-fast WordPress on Nginx' WHERE option_name='blogdescription';"
237+
# ss_mysql_user --execute="UPDATE ${DB_PREFIX}options SET option_value='Lightning-fast WordPress on Nginx' WHERE option_name='blogdescription';"
238238
# fi
239239

240240
## https://developer.wordpress.org/cli/commands/core/is-installed/
@@ -256,12 +256,12 @@ fi
256256

257257
## populate wp_options if not exists ##
258258
# if [[ "${DEV_SITE}" == "true" ]]; then
259-
# QUERY_DEVELOPMENT_WP_OPTIONS_EXIST=$(ss_mysql_root --execute "SHOW TABLES FROM development WHERE Tables_in_development LIKE '${DB_PREFIX}options';" 2> /dev/null)
259+
# QUERY_DEVELOPMENT_WP_OPTIONS_EXIST=$(ss_mysql_user --execute "SHOW TABLES FROM development WHERE Tables_in_development LIKE '${DB_PREFIX}options';" 2> /dev/null)
260260
# GREP_WP_OPTIONS_STRING_DEVELOPMENT=$(echo "${QUERY_DEVELOPMENT_WP_OPTIONS_EXIST}" | ss_grep_boolean "${DB_PREFIX}"options)
261261
# ## populate wp_options if not exists ##
262262
# if [[ -z "${GREP_WP_OPTIONS_STRING_DEVELOPMENT}" ]]; then
263263
# /usr/bin/php -qCr "include '/var/www/html/dev/wp-admin/install.php'; wp_install('SlickStack', '\"${SFTP_USER}\"', '\"${SFTP_USER}\"@\"${SITE_DOMAIN_EXCLUDING_WWW}\"', 1, '', \"${SFTP_PASSWORD}\", 'en_US');"
264-
# ss_mysql_root --execute="UPDATE ${DB_PREFIX}options SET option_value='Lightning-fast WordPress on Nginx' WHERE option_name='blogdescription';"
264+
# ss_mysql_user --execute="UPDATE ${DB_PREFIX}options SET option_value='Lightning-fast WordPress on Nginx' WHERE option_name='blogdescription';"
265265
# fi
266266
# fi
267267

@@ -288,31 +288,31 @@ fi
288288
## UPDATED: 19MAR2024
289289

290290
## production ##
291-
if [[ -n $(ss_mysql_root --execute "SHOW TABLES FROM ${DB_NAME} WHERE Tables_in_${DB_NAME} LIKE '${DB_PREFIX}options';" 2> /dev/null) ]]; then
291+
if [[ -n $(ss_mysql_user --execute "SHOW TABLES FROM ${DB_NAME} WHERE Tables_in_${DB_NAME} LIKE '${DB_PREFIX}options';" 2> /dev/null) ]]; then
292292

293-
ss_mysql_root --execute="UPDATE ${DB_NAME}.${DB_PREFIX}options SET option_value='https://${SITE_FULL_DOMAIN}' WHERE option_name='home'";
294-
ss_mysql_root --execute="UPDATE ${DB_NAME}.${DB_PREFIX}options SET option_value='https://${SITE_FULL_DOMAIN}' WHERE option_name='siteurl'";
293+
ss_mysql_user --execute="UPDATE ${DB_NAME}.${DB_PREFIX}options SET option_value='https://${SITE_FULL_DOMAIN}' WHERE option_name='home'";
294+
ss_mysql_user --execute="UPDATE ${DB_NAME}.${DB_PREFIX}options SET option_value='https://${SITE_FULL_DOMAIN}' WHERE option_name='siteurl'";
295295

296296
fi
297297

298298
## staging ##
299299
if [[ "${STAGING_SITE}" == "true" ]]; then
300300

301-
if [[ -n $(ss_mysql_root --execute "SHOW TABLES FROM staging WHERE Tables_in_staging LIKE '${DB_PREFIX}options';" 2> /dev/null) ]]; then
301+
if [[ -n $(ss_mysql_user --execute "SHOW TABLES FROM staging WHERE Tables_in_staging LIKE '${DB_PREFIX}options';" 2> /dev/null) ]]; then
302302

303-
ss_mysql_root --execute="UPDATE staging.${DB_PREFIX}options SET option_value='https://staging.${SITE_DOMAIN_EXCLUDING_WWW}' WHERE option_name='home'";
304-
ss_mysql_root --execute="UPDATE staging.${DB_PREFIX}options SET option_value='https://staging.${SITE_DOMAIN_EXCLUDING_WWW}' WHERE option_name='siteurl'";
303+
ss_mysql_user --execute="UPDATE staging.${DB_PREFIX}options SET option_value='https://staging.${SITE_DOMAIN_EXCLUDING_WWW}' WHERE option_name='home'";
304+
ss_mysql_user --execute="UPDATE staging.${DB_PREFIX}options SET option_value='https://staging.${SITE_DOMAIN_EXCLUDING_WWW}' WHERE option_name='siteurl'";
305305
fi
306306

307307
fi
308308

309309
## development ##
310310
if [[ "${DEV_SITE}" == "true" ]]; then
311311

312-
if [[ -n $(ss_mysql_root --execute "SHOW TABLES FROM development WHERE Tables_in_development LIKE '${DB_PREFIX}options';" 2> /dev/null) ]]; then
312+
if [[ -n $(ss_mysql_user --execute "SHOW TABLES FROM development WHERE Tables_in_development LIKE '${DB_PREFIX}options';" 2> /dev/null) ]]; then
313313

314-
ss_mysql_root --execute="UPDATE development.${DB_PREFIX}options SET option_value='https://dev.${SITE_DOMAIN_EXCLUDING_WWW}' WHERE option_name='home'";
315-
ss_mysql_root --execute="UPDATE development.${DB_PREFIX}options SET option_value='https://dev.${SITE_DOMAIN_EXCLUDING_WWW}' WHERE option_name='siteurl'";
314+
ss_mysql_user --execute="UPDATE development.${DB_PREFIX}options SET option_value='https://dev.${SITE_DOMAIN_EXCLUDING_WWW}' WHERE option_name='home'";
315+
ss_mysql_user --execute="UPDATE development.${DB_PREFIX}options SET option_value='https://dev.${SITE_DOMAIN_EXCLUDING_WWW}' WHERE option_name='siteurl'";
316316
fi
317317

318318
fi

0 commit comments

Comments
 (0)