Valentin Montmirail Valentin Montmirail - 2 months ago 7x
MySQL Question

Changing URL in Wordpress : Absolute links

I'm currently changing the URL of a Wordpress website, and I've got problems with it...

First of all, let's write versions of what I'm using

  • Wordpress: 4.5.3

  • MySQL: 5.5

  • PHP: 5.6

The website is hosted at
and when I access this URL, everything is working as expected, but I want to change this URL to

So I paid a domain name
(with and I made a forward with masking from

So now, when I access
, I access the home page of the website, and the URL is
but here start to be the problem...

Only the home page is working, all the links to the posts are dead...
So I made a search and replace in the database, and I change all the link
and when I access them directly by URL it's working, but when I access them by clicking on the website, the link is
and the URL is staying
(not keeping trace of

So I then find out that there are 2 variables in the database:

  • siteurl

  • home

and if I change just one of these 2 variables to
the website dies, I get a blank page and nothing is not working anymore...

So currently, I've got:

  • A domain name
    which make a forward with masking to

  • All the link the posts are
    in the database.

  • Access the URL
    directly is working.

  • Access the URL
    directly is working.

  • siteurl

  • home

Problems that need to be fixed:

  • Links on the website are still

  • siteurl
    are the old URL but if I change them, I've got a blank page.

I hope anyone had already this issue and will be able to help me :)


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Best Regards,


In your .htaccess file change the rewritebase to / instead of /blog/ when you are using, then change siteurl and home to