There are plenty of pros and cons to consider before choosing the right Content Management System (CMS) to use from project to project: WordPress, Drupal, MODx etc. One nice feature of using a system like Drupal and MODx is the use of relative paths in URL link location when storing parameters in the database. WordPress on the other hand uses absolute paths in URL linking.
“Absolute Paths: An absolute path is created whenever your link uses the full URL of an object or page. For instance, http://www.communitymx.com is an absolute path to a specific web site. This method is the best choice whenever you need to send a visitor to another site or need to get content from another site. While you can use it within your own site, there is rarely ever a need to do so.
Relative Paths: As you can probably guess, relative paths are used much more frequently than absolute paths. Any time you need to send a visitor to another page within your site or include an object from your site (like an image) on one of your pages a relative link will work just fine. Which form of relative link you should use will depend on how the site is constructed. Document and root relative paths each have a place in the building of a web site. Read on for a break down of each type.” - Bryan Ashcraft
If you decide to change the URL of your WordPress website, for instance: http://www.example.com/ to http://www.new-example.com/ there are some steps that you need to consider.
Also within your WP blog post content itself users may also use the old URLs when creating reference backlinks. All these values in the database will need to be changed when WordPress is moved. I’ll show you which database fields have reference or values related to the website’s content URLs that you want to modify.
The first thing to do is make a backup copy and move all files over. Once this has finished the first step is to tell WordPress the new URL location. We’ll be using SQL statements based on mySQL replace() function to directly modify the database, so you will need access to Here is the way to modify the value via MySQL database. You will need access to your phpMyAdmin or login to the DB server and run MySQL client as root. Use the following SQL command to update the new location of your WordPress website URL:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.example.com', 'http://www.new-example.com') WHERE option_name = 'home' OR option_name = 'siteurl';
After that you will need to fix URLs of the WordPress posts and pages, which translated from post slug, and stored in database wp_posts table as guide field. The URL values in this field are stored as absolute URLs instead of relative URLs, so it needs to be changed with the following SQL query:
UPDATE wp_posts SET guid = replace(guid, 'http://www.example.com', 'http://www.new-example.com');
If you have created reference backlinks within blog posts or pages with absolute URLs, these links will point to wrong locations after you move the blog location. Use the following SQL commands to fix all the internal links:
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
There you go, take a look through your WP website to make sure everything is working the way it should.
Hope this helps!