brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: wp option get siteurl and home show the URLs wordpress stores

WordPress
~/tips/tip-wordpress-option-get-siteurl-home

wp option get siteurl

Reads the stored site address and home address to find the cause of redirect loops.

A redirect loop after a move often comes down to two options that do not match what you expect.

wp option get siteurl
wp option get home
wp config get WP_HOME

siteurl is the address of the WordPress files and home the address visitors use. Both live in the options table. If wp-config.php defines WP_HOME or WP_SITEURL, those constants override the stored values without changing the database, so check them as well. The last line fails with an error when the constant is not set, which is already useful information. Change a stored value with wp option update home 'https://example.com'.

Further reading: WP-CLI: wp option get

More WordPress tips wp user application-password create anna backup-script --porcelain define( 'MEDIA_TRASH', true ); wp cli check-update wp theme delete --all wp media image-size All WordPress tips (85) All topics

Link