Mysql query to search and replace a string in your database

When moving a wordpress website from one server to another it is almost never necessary to do any database updates but when your moving your wordpress website and it is under a new domain name. The below query will come in handy as it allows you to find and replace any information in your database.

update [table name] set [field name] = replace([field name],'[old domain name]','[new domain name]');

Simply complete the query with the correct information, paste it into the query window in your phpMyAdmin and run it.

Hope this helps.

Other Posts

%d bloggers like this: