Recreating and moving a Wordpress website?

Scorpion Ghost

Elite Member
Executive VIP
Jr. VIP
Joined
Mar 22, 2013
Messages
9,147
Reaction score
10,489
So I'm creating a new Wordpress website, so that I can replace an old website. I can't just do a theme switch, because the old site is old in every sense, from wordpress version to plugins to theme to customizations, so I'm making a new site.

Current site - mysite.com
Current site database - mine_site

New site currently residing in - myname.com/folder111
New site database - mine_folder

The new site is currently set to "noindex" for the entire site.

But I'm unsure about how exactly to make the switch when the time comes.

---

The URLs

So if I just upload my new site folders in the old site's folder in my cPanel, is it automatically gonna switch all the URLs from old to new?

myname.com/folder111/category/whatever
myname.com/folder111/post/something

Are they gonna automatically become:

mysite.com/category/whatever
mysite.com/post/something

?

---

The database


Okay, so I could just empty out the database of mysite.com, and then import the database from myname.com. And also I'll have to open wp-config to change where it's pointing to (from myname.com to mysite.com).

Is this it?

---

The redirects (SEO, link juice, bla bla)

So my new site will have some new URL structure for certain things. I know there's a redirect you do so that you keep all the link juice. Basically you do it in order to tell the search engines that this URL.com is now located at URL1.com, and then they know and you keep the link juice and ranking and whatnot.

This is either done in robots.txt or htaccess. I need to check.

Any advice on this one?

---

As you see, I generally have an idea about what to do and how to do it, but I've never done this before, and I feel like I'm walking on a minefield a little bit. I don't wanna make a mistake.

So give me what you got on the topic? Thanks
 
IMO updating WordPress would come with a lot less hassle.
I did once what you want to try, but I can't remember how I worked it out, sorry. Anyway, it's in the side of my brain where it says "Don't do that anymore" lol

PS. I don't think you have to touch htaccess, renaming folders and setting WordPress should do it. If things go wrong in the process, the setting with address of website is in the database, you can hack it in there.

PS2. (lol)
Posts and pages are in database, not in folders. So you uploading things won't help. SQL import is what will keep the URL structure. Plus maybe some settings
 
Last edited:
IMO updating WordPress would come with a lot less hassle.
I did once what you want to try, but I can't remember how I worked it out, sorry. Anyway, it's in the side of my brain where it says "Don't do that anymore" lol
PS. I don't think you have to touch htaccess, renaming folders and setting WordPress should do it. If things go wrong in the process, the setting with address of website is in the database, you can hack it in there.

No no, I'm pretty sure that if URL structure changes, in order to keep the link juice, you need to do some 303 or 403 or some sort of redirect for each page that's changed.

Like:

redirect 303 https://blablabla
https://newblabla
redirect 303 https://blablabla1
https://newblabla1
Something like that. To tell the search engines that blablabla is now located at newblabla, therefore keeping your rankings for the pages and all that.
 
Yes, if you change domain, you'll have to redirect everything (at least what's important).
 
I would not create a new WP, I would work on what you have and modify it accordingly. I've done this plenty of times for 10+ year old sites with extremely old templates. It's even possible to do this with old builders which are generally the biggest hassle by far.
 
I would not create a new WP, I would work on what you have and modify it accordingly. I've done this plenty of times for 10+ year old sites with extremely old templates. It's even possible to do this with old builders which are generally the biggest hassle by far.

I have to create a new WP. The current theme doesn't work with older PHP versions (it gets really buggy), doesn't work with new version of Wordpress. It looks old, it feels old, is a pain in the ass and I never liked it anyway :p

The new theme I found is actually pretty damn good. It has very few things, and yet it has everything that I need.
 
I have to create a new WP. The current theme doesn't work with older PHP versions (it gets really buggy), doesn't work with new version of Wordpress. It looks old, it feels old, is a pain in the ass and I never liked it anyway :p
And what happens if you simply replace the current theme with a newer theme like Generatepress?

I would do in your case snapshots of your whole sitemap but the content will still be there (specially pages/posts). You could obviously also export everything with WP All Import and then pass it to a brand new word, which would simpliy everything 100%

About redirections, personally I'm currently liking RankMath redirection system but still I do a lot of redirections in htacess (specially the most delicate ones). But I like the fact that with Rankmath redirection addon you can tag redirections as if they were post, and you can set a "testing mode" to see how redirections work, how many redirections have been taken place (and used) which are really nice stats to see how things are moving and to know when redirections are not useful any more in the future.
 
And what happens if you simply replace the current theme with a newer theme like Generatepress?

I would do in your case snapshots of your whole sitemap but the content will still be there (specially pages/posts). You could obviously also export everything with WP All Import and then pass it to a brand new word, which would simpliy everything 100%

About redirections, personally I'm currently liking RankMath redirection system but still I do a lot of redirections in htacess (specially the most delicate ones). But I like the fact that with Rankmath redirection addon you can tag redirections as if they were post, and you can set a "testing mode" to see how redirections work, how many redirections have been taken place (and used) which are really nice stats to see how things are moving and to know when redirections are not useful any more in the future.

I don't want to use Generatepress or any other theme. I want to use the theme that I'm building the site on/with.

I don't know what would happen. I'm scared to think what would happen hahaha :D

But at some point I'll backup my current site, and then upload and activate the new theme, just to see what would happen. I expect errors and problems all over the place if I do that though.

I think I'll do all the redirects in htaccess manually. I try to avoid installing plugins for things that can be done without a plugin. Sort of a rule of thumb.
 
Doesn't Local do this for you with Blueprints and Envato with Template Kits?

Edit: nathan needs to read threads before replying
 
Doesn't Local do this for you with Blueprints and Envato with Template Kits?

Edit: nathan needs to read threads before replying

What? I don't, um... :alien: :D
 
So I'll be attempting this today or tomorrow. Here's what we got.

---

2 websites/domains:

site.com/site222/
diffsite.com


I need to move the first website to the second one. The site is wordpress.

---

I backed up both sites and their databases on my computer, locally.

I zipped up both sites in cPanel/File Manager, so that I can unzip them at a moments notice if anything goes wrong once I move the sites around.

---

I'm gonna follow this tutorial, for some guidance - https://help.one.com/hc/en-us/articles/115005585969-Move-your-WordPress-site-to-another-domain

---

First I'm gonna move diffsite.com to diffsite.com/randomfolder, in hopes that I'll still be able to access the old site. Because the new site was "modeled" on the old site, I want to have access to the old site in case I need to check something or compare something later. This should work, but you never know...

Second I'm gonna move site.com/site222/ to diffsite.com. Then I'm gonna go through the stuff from the tutorial above to change the database name and password and all that stuff. Just the basic stuff, to see if I can get the site on the new domain, with the new domain URL and everything.

If this works, I'm gonna go through the long process of checking the site and making sure everything works. And in the end I'll delete diffsite.com/randomfolder and it's database, and that will be that.

If it doesn't work, well, I guess I'll install fresh Wordpress on diffsite.com and recreate the new site from scratch again, brick by brick...
 
I think just two steps would be fine: 1. create a new website with same content and url structure 2. do a 301 redirect from old url to corresponding new url. it can be done by changing .htaccess file.
 
I think just two steps would be fine: 1. create a new website with same content and url structure 2. do a 301 redirect from old url to corresponding new url. it can be done by changing .htaccess file.

Yeah I'm going to do that. It's gonna be a pain, there's like 200+ redirects I gotta add.

But there may be about 1000 more, if I need to set redirects for all the media files (photos) :oops:

Not sure if I need to, but I bet I do if I wanna keep the ranking and all that. Gotta do a google search...
 
First I'm gonna move diffsite.com to diffsite.com/randomfolder, in hopes that I'll still be able to access the old site. Because the new site was "modeled" on the old site, I want to have access to the old site in case I need to check something or compare something later. This should work, but you never know...

Well, this didn't work. The new site is accessible, kinda, at least the homepage. But for all intents and purposes it's not accessible, didn't work.

If this was an HTML site I could add it on 5 domains in 5 minutes, no problem. But once you involve databases, it's just a pain in the ass.

Well, I'm gonna have to go blind on the new site. And if I need to check something from the old site or whatever, I'll restore the old site real quick. Of course, if I make any database changes, I'll have to restore the database too. Well, I'll do my best...
 
Okay, I uploaded the new site on the domain's folder in File Manager.

I went in database, in wp_options, and changed siteurl and home. This is very cool, it changed all the links on the site from the old URL to the new one (except the hardcoded links, but that's a different story, I need to fix those manually).

I had a problem with all the links leading to "Internal Server Error". So I went to Settings/Permalinks and just clicked Save Changes. And then I deleted site cache. Now all the links/pages on the site open fine, it seems.

Ok, I'm gonna delete/purge all the tables from the old site database, and then import the tables from the new site database, and then go to wp_config and change the details. This is surely to cause a major castrophy. I'm gonna go puke real quick, then come back :p

 
Had a small hiccup, but everything seems to be working.

I changed the Administrator, because the one I had on the site started as a test, and I want it to have a different username/email etc. So I logged out of site, created new Admin user, logged in with new Admin user, deleted old Admin user, and attributed all contents from old admin user to new one. It seems to have worked...

Changed the hardcoded links in footer and header. And checked each post type page to make sure they all open fine, and they do.

Made the site indexable - Settings/Reading.

Checked the contact form (created with Jetpack), it didn't work, I didn't receive the email. I installed a plugin that logs all outgoing emails, did the form, it worked. I uninstalled the plugin, did the form, it worked. This is the second time in my recent history that installing this plugin suddenly made the emails work. Anyway, maybe the first attempt was a fluke for some reason. This is the plugin anyway - https://wordpress.org/plugins/email-log/

Checked another form (created with Contact Form 7), it worked, but it sent the email to the wrong email. The email of the previous site admin. The plugin sends the email by default to [_site_admin_email]. So I googled how to find the site admin email and change it. You go Settings/General, and change Administration Email Address. I changed it, submitted my form again, and got the email where I should.

Okay, so far so good...

---

Okay, I need to go for a walk or something. This shit really drains me. It's all very acidic above-the-shoulders mustard shit :D


I'll smell you guys later :p
 
Okay, I added 17 301s for categories and other crap.

Now I gotta do about 130 of them for jobs. Oh shit, it's gonna take forever...

Anyway I'll fucking do it, and then I'll stop for today (probably). From what I can see, after this is done, the site is live and functional, and all set for google and the seo crap.

Well, all set except for the images in the search engine results. Most of the images are now 404. But nothing can be done about that. Well maybe it can, but I don't know how, and at some point I just have to cut my losses and move on. Besides, the only reason to fix those 404 images are the search engines, and I don't give more than 1 shit about search engines, and I've already done enough for them.
 
Okay, so yesterday I pushed until I implemented all the 301s, and by that point I was dead, so I went to sleep. I figure, the site was ready at this point, roughly speaking.

But it ain't readyyyyy. There's a lot more shit to do.

  • Need to check all blog posts and jobs and pages to change any hardcoded URLs.
  • Need to check all functionalities (register, login, buy, private message, etc etc)
  • Need to check all the plugins, set all the settings, make sure they all work

I'm sure there's more, but that's what comes to mind now, and it's more than enough haha. I just woke up.
 
Back
Top