skip to Main Content
Two Lines

Two Lines Equals Full Swap

Reading Time - 3 mins

Last Updated on Wednesday, April 12, 2023

Two Lines Equals Full Swap

Cool name for the post title, but two lines of what? Coke? Rounds of shots? No – this involves two lines of coding that swaps out a URL.

Before we come to the lines of code, we suppose that an explanation is needed as to why we did this.

Firstly we were advised by our consultants that our website title was not a domain, secondly that not all of our keywords were in the title, and thirdly, why not use a domain name that we already owned to appease these factors?

So brushing off a few cobwebs from our parked domains, we decided on using as the new website title and redirected all of the content from over to the new content.

We were dreading needing to do another full migration, as was the case when we were using TSO as our hosting provider, but Krystal said that there was no need for all of that using their systems, and it could all be done by using two lines of code.

“Nah, that’s bollox,” we thought – “what about all of the files?”

All of this was being done in a ‘live chat’ session with Krystal, and all they did was ask for the old domain, the new domain that we wanted the content adding to, and it was all done within 10 minutes.

More pretty spectacular stuff from Krystal then who in our minds are a hosting provider to hang on to!

So what are these two lines of magical code that can swap everything from one domain name to another?

define( 'WP_HOME', '' );
define( 'WP_SITEURL', '' );

And that’s it!

No tedious migrations or website downtime, though we DID have to wait a few seconds before the SSL certificate kicked in, but that happened whilst we were watching!

Cleaning up

Of course, there were a couple of other factors that needed to be changed as well, but we left those to run whilst we were having a coffee.

We needed to run a SEARCH/REPLACE on the whole website, to make sure that all instances of were replaced with and this was completed within ten minutes.

There were also a couple of links on the front page that wouldn’t change, so we had to do those manually.

Then we had to change the sitemaps from to so that Google Search Console would start to pick up on the new address.

Finally, we performed a 301 wildcard redirect from over to so that apart from the website title, no-one would notice any difference whatsoever.

All this took an extra 20 minutes, so within 30 minutes of starting a chat with Krystal, the website had been flawlessly ‘migrated’ to a new URL without the aid of a safety net!

Now as a special feature, we have a video by the ‘Code Babes’, who whilst stripping down to bare minimums and becoming a teacher that every red-blooded pupil would be dodging his todger off to, we could hardly work out what she was on about.

Dunno, maybe there were one or two distractions, and maybe we’ll need to view it a few more times to grasp the concept, but here is one of the Code Babes teaching about PHP conditional statements:

We hope that you enjoyed our first real post under the new website name, and we look forward to seeing you soon.

Originally published on Nottingham Escorts UK by the NEWS team.


Lead image from:

Share this page on...

Your premier 24 hour Nottingham Escorts Agency, available for all kinds of naughty adult entertainment!

Midlands Maidens Nottingham Escorts

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

The maximum upload file size: 5 MB. You can upload: image, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here

Back To Top