[wp-hackers] Why hard-code the base URL (and directory)?
Damian Jakusz-Gostomski
damian.gostomski at googlemail.com
Mon Mar 12 10:05:03 UTC 2012
In my experience, a simple search and replace will often break parts of the
site, when the URL is within serialized data, and the length of the URL
changes...
To get around this, I recommend the search and replace tool from
InterconnectIT
http://interconnectit.com/124/search-and-replace-for-wordpress-databases
On 12 March 2012 10:00, Braydon <ronin at braydon.com> wrote:
> Hydrostarr,
>
> To migrate a site from one domain to another, the best way is to search
> and replace the domain and take care of it all at once, a script could
> easily automate this process:
>
> mysqldump -u youruser -p yourdatabase > database-2012-3-12.sql
>
> sed -i 's/olddomain\.com/newdomain\.**com/g' database-2012-3-12.sql
>
> mysql -u youruser -p yourdatabase < database-2012-3-12.sql
>
> -Braydon
>
> ______________________________**_________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.**com <wp-hackers at lists.automattic.com>
> http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists.automattic.com/mailman/listinfo/wp-hackers>
>
More information about the wp-hackers
mailing list