Don’t save fully qualified domains in the database
-
I think siteurl (and home if really necessary although a relative link could be better), would sit better in the wp-config.php file.
That would do away with the need for the find and replace task when moving between development sites and live versions or when moving the domain of a site in general.
At the moment if I want to bring to my development site the latest data, instead of just doing and mysqldump or export from phpmyadmin and uploading the file to my dev server, I have to do a find and replace step to take out example.com and replace it with dev.example.com, then do the import. IMHO this adds an unnecessarily complex and potentially error inducing step to the proceedings.
When I am finished my testing I then have to do the same process to move the data back again.
If the siteurl was set in the wp-config.php file all guid links in wp-posts could be relative to the baseurl and the siteurl variable could be added as required.
- The topic ‘Don’t save fully qualified domains in the database’ is closed to new replies.