Recreating and moving a Wordpress website?

Need to check all blog posts and jobs and pages to change any hardcoded URLs.

Still working on that, and picking up all the other crap I find along the way.

Changed all hardcoded links in header, footer, and all pages. Changed all the hardcoded links in blog posts, and edited some blog posts a little bit to reflect the new reality of the site. Now changing all hardcoded images in blog posts. Also caught some images and a link in blog sidebar that had the old URL, so I fixed it. Also the captcha on the blog posts, changed the site and secret keys. Also edited user profiles in the database to change the URL for their profile photos.

This is gonna take a while...

On the bright side, someone registered on the site and uploaded $15 bucks. So, yay, it's paying off :p

But, the upload was with paypal, as a regular payment, so who knows if we'll get hit with a chargeback later :(

Oh well, I'm feeling good though. The hard part of getting the site to go live is over. Now it's just about throwing a coupla hundred hours at it, and it will be a polished gem :)
 
So, I'm checking the source for various pages on the site, and I replaced all the mentions of the old site, to the new site.

But I'm finding some mentions of the old site that I don't know how to replace. Like some postmeta weird shit. This has to be in the database. If I don't know what it is at this point, it has to be in the database :p

So I backed up the database and the entire site, and I'll try this - https://wordpress.org/plugins/better-search-replace/

From what I'm reading, this should catch everything and in the database and replace the stuff. If anything goes wrong = delete everything, upload backups.

Fingers crossed...
 
So, I'm checking the source for various pages on the site, and I replaced all the mentions of the old site, to the new site.

But I'm finding some mentions of the old site that I don't know how to replace. Like some postmeta weird shit. This has to be in the database. If I don't know what it is at this point, it has to be in the database :p

So I backed up the database and the entire site, and I'll try this - https://wordpress.org/plugins/better-search-replace/

From what I'm reading, this should catch everything and in the database and replace the stuff. If anything goes wrong = delete everything, upload backups.

Fingers crossed...

Well, damn. So first of all, this is a nice plugin. You can do what they call a "Dry run" which tells you how many things need to be replaced, without actually replacing them. In my case:

DRY RUN: 54 tables were searched, 7500 cells were found that need to be updated, and 0 changes were made.

But like, for example it found one in wp_users. But then I check wp_users in phpMyAdmin and I don't see anything. But then I check wp_users in the database by opening it in Notepad++ locally, and I find it. But this user is a deleted user. So then, how can I find the deleted user in the database that I downloaded, but can't find it in the same database in phpMyAdmin?

I'm sure there's an explanation, and someone would know, but it's above my paygrade, and frankly I don't really give a shit :p

Okay, I'll YOLO it. I'll run the plugin and replace all the 7500 cells. Sometimes you gotta YOLO it man :D
 
Okay I ran it, and when it was done I got:

Sorry, you are not allowed to access this page.

:eek:

---

Oh for fucks sake, I accidentally did it on the other domain, where I originally created the new site. That's my queue that I've been at it for too long and I'm burning out slowly :p

Anyway, did it again, on the right site this time. On the actual site we have:

DRY RUN: 55 tables were searched, 3985 cells were found that need to be updated, and 0 changes were made.

Okay, that's a bit more like it, makes more sense.

So, YOLO again :D

Okay I did it, site seems to run fine. But I have some postmeta crap like this:

https:\/\/site.com\/site333\/?p=3541

Yeah, I had the site before in a folder on a domain, so it's not just the domain that needs replacing. Yeah, dumb, but no biggie.

So I have to replace these too. Gotta be careful to set it correctly. I ran the Dry Run on the plugin for these, and got:

DRY RUN: 55 tables were searched, 0 cells were found that need to be updated, and 0 changes were made.

Well shit. I ran again just with the domain name:

DRY RUN: 55 tables were searched, 237 cells were found that need to be updated, and 0 changes were made.

So I checked and it shows 1 instance that needs to be replaced in wp_posts. But when I check wp_posts in phpMyAdmin, I found more. I think the plugin didn't get them because there's an option in the plugin:

Replace GUIDs
If left unchecked, all database columns titled 'guid' will be skipped.

I leave that unchecked, so I think that's why these were not picked up.

In the end I think I'll just do the remaining changes manually one by one, just to know what I'm doing and what's going on...
 
DRY RUN: 55 tables were searched, 237 cells were found that need to be updated, and 0 changes were made.

Okay, so about 100 of these were for the old site admin email being written places. I figure we won't have any problems by replacing those, so I did. Just to reduce those numbers a little bit.

We're down to:

DRY RUN: 55 tables were searched, 139 cells were found that need to be updated, and 0 changes were made.

And they're all in wp_wfhits. What the fuck is wp_wfhits? Wordpress Wordfence Hits (live traffic)? Ugh...

Okay, it has to do with wordfence - https://wordpress.org/support/topic/wp_wfhits-table/

I'll just leave this be. This table shouldn't be involved with site functionalities or with how the site is read by search engines, so we'll just leave this be.

---

https:\/\/site.com\/site333\/?p=3541

I still need to figure out where these are coming from. Has to be the database.

When I do inspect element, all these instances are wrapped in:

(script type="data/json" class="postdata")THE SHIT IS HERE(/script)

@TomTheCat any idea what's generating these?
 
https:\/\/site.com\/site333\/?p=3541

Okay, I think I found these shits, in wp_posts. They're the GUID. Sounds important :p

I found some googles.

This guy is asking how to change them - https://wordpress.stackexchange.com/questions/211156/how-to-change-all-the-guid-in-posts-table
This guy is telling you why to change them - https://deliciousbrains.com/wordpress-post-guids-sometimes-update/

The point is, changing them won't open the gates of hell, hopefully. I'll try to use the plugin, allowing it to change GUIDs, and run it...

However, this article, which is from that plugin, says to never ever under any circumstances change the GUID - https://wordpress.org/support/article/changing-the-site-url/#important-guid-note

But I did a test:

https://oldsite.com/site333/?p=3515https://newsite.com/?p=3515
And the same page loaded. So I think, in my case at least, changing the domain won't open the gates of hell. What's important is to not change what comes after the domain.

I did a dry run, with GUIDs included:

DRY RUN: 55 tables were searched, 3034 cells were found that need to be updated, and 0 changes were made.

Okay, now for sure the site will explode and vanish forever when I replace all these. For sure :D

Anyway, I backed up the database again, and I go YOLO again...

---

Ok, this is fixed now, it's not present anymore.

https:\/\/site.com\/site333\/?p=3541

One other issue (may not be an issue) I see is the blog homepage, when I check source, I'm literally finding all the content from every blog post on the homepage in there. But not from later posts. Only the content from the posts that are on the homepage. Not sure if this is an issue or not (duplicated content or some shit)?

Whatever, I don't give a shit, let google get a heart attack because of it, fuck it.

Moving on now...

 
Need to check all blog posts and jobs and pages to change any hardcoded URLs.

Okay so this is finally done. I should have covered everything and tied up all the loose ends. If I missed anything, I'm sure it will pop up someplace, or just isn't that important.

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 also need to upload the old site that was live previously on another domain, so that I can access it. I need to be able to access it when I do the plugins, in case I need to check how something was set up previously. And I also need to check all the jobs to see if I embedded all the videos on the new site, to see if I didn't skip any.

---

I think I made good progress today. Fingers crossed I didn't do anything that's gonna bite me in the ass later :p

I need to stop now though. I'm pretty drained, can't keep going...
 
I also need to upload the old site that was live previously on another domain, so that I can access it. I need to be able to access it when I do the plugins, in case I need to check how something was set up previously. And I also need to check all the jobs to see if I embedded all the videos on the new site, to see if I didn't skip any.

Okay, let's try to continue.

I uploaded the old live site on another domain folder, edited wp_config, uploaded database, edited wp_options. To my surprise, it worked, I can access the site. It's always surprising when something like this just works. Because usually it's just problem after problem :p

I checked all the jobs, found a few where I didn't move over the videos. I had a feeling I would. There's always that one or two that get away from you. Anyway, I took care of that.

---

Need to check all functionalities (register, login, buy, private message, etc etc)

This is also actually pretty much done. As luck would have it, the guy who registered yesterday and uploaded $15 in his account, thanks to him we got to use the register form, the login form, the password recovery, the contact form, the add funds, the private message, the buy order, the deliver order. So that's pretty much all the functionalities I wanted to test. Nothing else comes to mind.

And this is great because it was used by a regular user of the site, so it was really like a live thing. It wasn't me doing it, only to find out that it doesn't quite work for other people like it worked for me that one time. You know, it always work when you test it, and then it doesn't when it goes live :p

---

Need to check all the plugins, set all the settings, make sure they all work

So this is the last thing that I have to do. Annoying. I'll try to get it all done now.

---

When this is done, we're technically done. But of course there's a lot of loose ends and little things that I still need to check.

Check sitemap/webmaster tools (google, bing, yandex)
Delete the other sites from the other domain, and the database/user
Save all the users logins in the right file
Save the files for the new site theme in the appropriate folder
Do a final backup for the new site (site+database)
Save the final backup for the old live site int he appropriate folder
Clean up all the residual crap and cum stains that were left all over the place on my lap top during this entire process (unnecessary screenshots, and databases, and files, etc)
Set the "Add funds" page to not be indexed
Set the "Add funds" page to only be available for logged in users
Check to make sure the "Tags" pages are all "noindex"
Check to make sure the downloadables on the site aren't publicly visible/accessible

Okay, that's all that comes to mind for now. I'm sure there's a few more things. See, can never be done with it...
 
So I ran into a terrible problem, scared the shit out of me.

I delete the old site, from site.com/folder333. And my new site on otherdomain.com suddenly won't load :o

I restore the old site, and then it worked again.

I disabled Wordfence, Yoast, Cache, Jetpack. I deleted the old site, the new site works.

I enabled cache and enabled it, still works.

I enabled Yoast, still works.

I enabled Jetpack and enabled it, still works.

I enabled Wordfence, still works.

---

So I don't know what the hell happened. I'll guess that it was Jetpack, because it was authenticated with Wordpress.com while the site was still on the other domain, and perhaps it was using something from the other domain to function. And when that something was deleted from the other domain, Jetpack couldn't use it, and it brought my entire site down. Or maybe it was the cache plugin doing the same thing.

Because both the cache plugin and Jetpack I had to setup/activate again after disabling/enabling them. While Yoast and Wordfence didn't require anything further.

I don't know. This is why I waited until the end to delete the old site. I knew it had some shit in store for me.

Anyway, moving on...
 
Us rookies learn to understand trial and error is a good thing because of folks like yourself :cool:

There can only be so many problems to solve, you'll get there handsome
 

That's what I'm talking about :D

Let's calm down the situation with a very relaxing video of calm calmness :p


---

Regarding this thread, I did A TON of shit today, but of course, not over yet. I'll get back to it tomorrow, my tank is empty now...
 
Try using redirect plugins freely available and it can do the rest for you mate.
 
Okay guys, yesterday was kinda crazy. By the end of it I was just going with the flow and fixing things without thinking what I need to do. Like sort of semi-autopilot functioning.

And things just keep popping up. Like I just got monthly emails from Statscounter to inform me of the traffic my sites are getting, only to realize I didn't add it on the new site, and I didn't add it on a previous site I changed the template on either. So now I gotta do that.

Shit just keeps popping up, and I keep taking care of it, and then more appears.

Anyway, let me try to get re-organized for today...

Check sitemap/webmaster tools (google, bing, yandex)
Delete the other sites from the other domain, and the database/user
Save all the users logins in the right file
Save the files for the new site theme in the appropriate folder
Do a final backup for the new site (site+database)
Save the final backup for the old live site int he appropriate folder
Clean up all the residual crap and cum stains that were left all over the place on my lap top during this entire process (unnecessary screenshots, and databases, and files, etc)
Set the "Add funds" page to only be available for logged in users
Check to make sure the downloadables on the site aren't publicly visible/accessible
Add statscounter code on the site (and the other site)

Okay, that's it for today. But surely more shit will appear along the way...
 
Back
Top