WordPress: How to update database URLs in a recently moved installation

Scenario

During the development stage we set up a test enviroment, so the client can see the new features. We can test the application in a server configuration real close to the final one. We test PHP configurations, Squid rules and we test the cache.

Once the development is done we establish a release date. This date we install the application in the final enviroment and we release it to the public.

Problem

The migration process between servers, often requires changing the WordPress installation URL. This means we have to update the database. We should replace all the ocurrences of the old domain with the new one.

Solution

We use to execute a SQL sentence that replaces old domain URLs with new domain ones. You can copy the next code to notepad, replace old_domain.com and new_domain.com with your values.
After that copy the sentence to your favourite database manager (phpMyAdmin, HeidiSQL, Navicat, etc…) and execute it.
(more…)

Read More