SO FINALLY to my question: Is this indeed a brilliant solution, or is there a real possibility it will it cause me major problems like broken links and database corruption in the future?
You will find that new content created refers to the new URL, even after you remove the config statements, and old content may still refer to the original URL.
So yes, it will cause problems. You can’t change a sites URL by adding defines to the config file, the database needs migrating too with an appropriate search replace tool. ( an SQL query is not that tool ).
There are many ways to achieve your goal, this is not it.
Related Posts:
- Publishing WordPress from stage to production server
- Proper way to have multiple installs with a single database
- Plesk login inaccessible after changing site URL
- Change of “home” results in timeouts (only on index.php)
- Best practice for versioning wp-config.php?
- Password in wp-config. Dangerous?
- What’s the difference between WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT?
- Turn Off Automatic Trash Deletion?
- How can I change preview URL?
- Override the wp_siteurl and wp_home not work
- Changing WP_CONTENT_DIR and WP_CONTENT_URL in wp-config.php does not register?
- Missing a temporary folder despite settings in wp-config.php
- How to use live images on local install?
- Syntax of FS_CHMOD_DIR and FS_CHMOD_FILE
- WordPress PHP error handling and reporting in production environment
- Declaratively Configuring WordPress in XML or JSON or YAML
- WP_MEMORY_LIMIT didn’t work in wp-config
- Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 20480 bytes)
- How to set up gmail SMTP in WordPress
- error:-Cannot modify header information – headers already sent by
- Changing HTTP URL Port
- wp-config.php file permissions
- How to update WordPress from the latest trunk
- how to use is_admin in wp-config.php
- Locked out of WordPress Site Admin after enabling Force SSL on WordPress Https (SSL)
- Set wp-content folder to Dropbox folder
- Best practice differences in DB options and wp-config between live, staging and local WordPress environments?
- Including a 3rd party library in WordPress which needs to be accessible by wp-config
- wp-config.php being deleted
- Get WP CLI to hide debug warnings and notices in JSON output, same setting as website
- Installation Issue WordPress locally – The file ‘wp-config.php’ already exists
- What is this file: wp-config-wpe.php?
- Putting my site live
- enable SFTP via SSH keys in wordpress
- html lang=”” instead of lang=”en-us” – why?
- Why do I get a WAMP homepage when clicking on specific website’s URL on LocalHost?
- Creating the wp-config.php file manually
- What Does this Code Snippet Do?
- WP_Debug not displaying anything
- Can I delete `wp-config-sample.php` after installing and configuring WordPress?
- When clicking on “home” page from any other page, it goes to IP address and my website doesn’t load
- How to reliably set file/folder permissions?
- Multiple wp-config.php files in one home directory
- Why edits to wp-config.php must come before “That’s all” comment
- error log cluttered with undefined DB_USER wp-admin/setup-config.php
- wp-config dynamic hostname in WP_HOME and WP_SITEURL
- Is it possible to override the ABSPATH constant
- How to stop fatal error when loading theme template file directly
- Force WordPress to load from site’s hostname
- Should I change wp-config for SSL?
- Out of memory errors : how best to track them down
- Localhost to Staging to Development Dynamic WP-CONFIG
- Redefine cookie domain for subdomains
- multiple language directories
- Error in database connection [closed]
- Update wp-config.php and lost pages
- blog url redirecting
- Conflict with wp_homeurl, wp_siteurl and admin interface settings
- Redirect to another page using contact form 7? [closed]
- error messages in dashboard login
- where should I write constants in wordpress?
- Issues copying site into local machine
- Autosave interval remains default despite wp-config.php defines
- Carriage Return control character (^M) found in wp-config-sample.php
- Are the wordpress settings (abspath, disable core updates) added by SiteGround of any use after I’ve migrated to a different host?
- Need help fixing my wp-config file [closed]
- Why was my new WordPress installation’s config page publicly viewable when first installed?
- WP_MEMORY_LIMIT didn’t work in wp-config, only within default-constants.php
- Cookie set without HttpOnly flag
- Changing the wp-config.php broke the site
- Define option outside wp-config.php (on WordPress.com)
- Site lost all formatting when I attempted to migrate to Bluehost [closed]
- Moving wp-config.php one level up – 500 error – Nginx [closed]
- How can I configure an SMTP Server?
- What should index.php contain on Synology NAS to get external access to WordPress to work?
- Remote server does not read `WP_HOME` from wp-config.php when local server does
- Cannot access WordPress website from external IP while internally it is working properly [closed]
- IP addresses to block to stop WP auto-update?
- Concerns over wp-config file [closed]
- Site Address and WordPress Address settings when using a load balancer
- Not showing old migrated content in website
- How to rename the wp-config.php file once under version control?
- Read wp-config without loading the rest of WordPress – i.e. wp-settings, etc
- How turn on error reporting without reset?
- WordPress installed on a Sub-directory
- Editing wp-config.php file asks for another installation
- $post->id vs $post->ID problem after using WordPress config bootstrap
- ABSPATH not defined?
- WordPress login redirection not working on Nginx root directory
- Need help re-connecting local WP-config file to local database
- Domain not redirected correctly with WordPress Multisite
- wp-config.php randomly will reset to wp-config-sample.php
- WP_SITEURL vs WP_HOME link output
- What can an attacker do if he has access to my wp-config file?
- How to fix wp-login.php gives error 500 after migration?
- Change default wordpress FS owner
- Define new constants in wp-config
- sudden changing of host IP result in crash of the site
- Move wp-content outside root
- Can you define readability settings in wp-config.php?