Migrate WordPress Site From Subdomain To Replace Production Site

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial I'm gonna show you to migrate a wordpress site from a subdomain to the root domain to replace a live site with as little downtime as possible and we're getting started right now hey what's up guys welcome back to another video it's Bjorn from the WP Learning Lab we hope you get better at WordPress so you can earn more for yourself for your clients and for your business if you're new here hit the subscribe button then at the bell notification icon so you don't miss anything and with that out of the way let's head in the screen capture and migrate a sub domain to the live site I'll see you there just to show you what we're working with on the old site all we have really is a blog listing page with all our blogs and a member area that's all there is on the new site what we have is a lot more stuff going on we've got a nicer homepage still to be finished but it's good enough for now we've got a nice course listings page we've got the about page help page coffee page and the blog the blog is all the same content as before it's just designed differently different images just looks a lot nicer and this is going to be the new site and we're going to move this site in place of the old one with as little downtime as possible now before I started I took complete backups of both websites manual backups I've linked to a video down below to show you how to do that if you don't know how and the way we're going to the actual transfer is using the duplicator plugin but before we can do that we have to do a little setup so we have to go into the new site the one that's redesigned and get into the dashboard of that site because we need to install the plugin and that plugin is the duplicator plugin which is going to be used to transfer this site so we head over to plugins and then click on add new and then type in duplicator this is the one I use right here I already have it installed so it shows an active great up button you would click install and then activate and then we have a new menu item that pops up on the left hand side called duplicator at the very bottom click on that to open the top-level area and this is where we see what are called packages and packages are basically backups of the site that can be used for transferring and we just click on create new to create a new package and it's going to give us some information about what it's going to do it's basically checking to see if the server passes or requirements it's going to give us the name that the file is going to be called just leave mine as it shows mix it's not that important a couple other settings that you don't have to worry about but you can go into these little dropdowns and read more about them but the default values for 99% of the cases work just fine then click on next and it's going to scan our site and give us more information so the scans completes going to show us our server checks now good we have some size warnings the package is going to be five hundred sixteen megabytes which is over the recommended 150 I haven't found it to be an issue with this plugin but apparently sometimes it is so watch out for it name checks this is when it's found illegal characters in filenames and I have this one image multiple versions created by WordPress of this image has quotation marks in the filename so big fail and in quotation mark to a filename but it's all the same images being resized a bunch of times I have to worry about that one I'll just clear that up later large files is also an issue files over three megabytes so this one here is a looks like a demos plugin for learn - and then another learn - one for six megabytes and those aren't a big deal so I'm just gonna keep those not worry about it and I'm going to those of those down again we have some more checks all turned out good and because there are warnings we have to click yes I want to continue in that check box and then click on build and now it's gonna actually build the package over again you could use to transfer the site to the live domain this often takes a few minutes so I'm just going to pause it and get back to you when it's all done the package has been built we have two buttons for downloads just click on the download click the Installer to download it and the arc I have to download it now while those downloads to our site we're going to create a new database on the live domain server so if we head over to the cPanel for that I'm gonna go into MySQL databases I'm just gonna create a database with a bunch of random characters there's no reason you have to have one they can remember because you only use it once so don't worry about it put the database name into a text editor for safekeeping because we're gonna need that in just a second let me create a user how you generate the password first because of LastPass because it will you know to overwrite the password I enter and it's a big pain sometimes but either way my process is password first then random username add my passwords in click on create user then copy the username and throw it into our little file here and the last step is connecting the user to the database usually at the bottom of the page the reason you do this is because you want the database to be able to connect to the website or vice versa and we have to give the user privileges in that database too let's do that if you don't do that you're going to get an error establishing database connection error I've linked to video down below as well to give you more information on that if you do get that error but we've disconnected the user to the database giving all privileges so we should be good to go if we head back out to the main area I'm gonna go into the file manager and now we're gonna upload those files that duplicator gave us the installer file and that archive so I'm gonna go into the root of the existing website then I'm going to click on upload and I currently have a 1 gigabyte limit on my account and my archive happens to be 516 I think it was megabytes or well under the limit if you are over the limit your only option is to use other FTP or SSH to do the upload and I've got some other video is coming where I show you how to do that but for this example we're under that limit so it's not going to be a problem so I'm just gonna get my files first the Installer just gonna drag it into the - box over here to upload it that one goes really fast then the archive which takes a bit longer because it's larger we're gonna wait for this to upload and until then I'm just going to pause this video now the files uploaded we can close this tab and over here we can reload and we can see our files so there's the archive we just uploaded and install our file is right here so those are the two files we need to make this transfer happen and now we get to the interesting part where we have to move a little faster up until now nobody in the real world really notice what we're doing but now we're going to take down the existing live web and we're gonna do that by putting into a type of maintenance mode where we replace the home page with a coming soon message or under maintenance message or whatever you wanted to say so our home page currently is this we refresh we see it loads this page again and what I've created which you can get access to in the blog post I'll link to down below is a new index file this is just a PHP or sorry HTML file it's going to open the code editor just a super basic HTML file that says we'll be back soon but apologize for inconvenience we give them an email I feel like I gotta contact us immediately and we give them a date and time when the site should be back online and the way that looks is if we change this file name to index dot HTML and then head back out here refresh this page this is how that message looks on the page like I said something most beautiful thing in the world but it works and when you do these transfers the site shouldn't be down for very long a few minutes tops obviously this is taking a lot longer because I'm walking you through it I wouldn't be talking the whole time actually doing this so it's taking a lot longer but we've done this once or twice and you actually doing this process it can take just a couple minutes to get this done just in case somebody lands here needs help they can email you they know when the site's going back online so they kind of have a guideline which makes people feel better one thing to note is when we change that index file to be active change it to HTML the rest of the site still works so if someone was on the blog post or browsing around the blog they would still see the site as normal just the home page has been replaced but now we're gonna take the whole site down we're gonna create a new folder I'm gonna call the folder old site I'm gonna select all the files I'm gonna deselect our index.html file deselect the Installer these select the archive these select the old site folder and now drag and drop everything else into the old site folder now we only have these three files and the folder on the page if you're refresh here we still have the index page but now restless type is gone to people who are surfing the blog if they try to reload the page go to a different page the blog won't be there anymore so this is where it gets real and you got a hurry and it might be wondering why I put this into an old site folder and why I'm in a new database why just overwrite the existing database the reason is we can revert back really quickly to the old site if we have to we're going to create the new database if everything goes well we'll just delete the old one which is easy to do but if something goes sideways in the transfer then we a have our old database there and B we can just copy all the files back out of this folder into the root and our site is back online in seconds and then we go back and try to figure out what happened with the transfer figure out why went wrong and then hopefully do better the next time so now it's time to install this thing gonna head over to our site forward slash installer dot PHP and this is the duplicator file installer now I've got our archive here we got a green pass for having our archive that's good validation everything's been validated as good also good I've got some options to go through if we want I just don't mess with these defaults are fine some terms and conditions yes you've read them click on next now we're just wait a little bit for this to deploy and now we have some stuff to do in step two is where I put our database credentials now the plug-in if you have the pro version you can actually create the credentials on its own through the cPanel option but we don't have the Perl version also don't need the pro version so we created those manually and we're just going to copy and paste them into place just by heading back into this text document here gonna copy the database name into here the username and password and we have a warning here that says the action of bow that we selected connect and remove all data is going to delete the entire database we're okay with that cuz it's empty it's a brand new database so again create new only works if you have the pro version and localhost is usually good enough for the host i've encountered some servers that have required an IP address but the vast majority of local hosts that's just fine options down here again find how they are change them if you're a pro if you're not a pro use the defaults because those are just fine click on test database down here just to test the database everything's good now we can go ahead and click on next to go to step 3 after we get a confirmation page again yes it's all gravy go to page 3 may take another few minutes for this to work through now run step 3 we have some settings here that are auto detected the path or sorry the path the URL the title was just fine there are some more options here this is important stuff for replacing the content in the database and the reason this is important is because some plugins are what's called serialize which means they're associated with the dole domain name or any domain name that are installed on you want to make sure that domain name is replaced in the database otherwise those plugins won't function properly until they're deleted and then reinstalled so with this scan and update you can get around that because this plugin will update those plugins automatically or those tables it's going to scan all of these tables for instances of old URLs and old paths and update them to the new ones and then once it's all done it's going to activate all these plugins then you can choose to turn on these check boxes if you need to but you don't really need to so you just leave those as is you don't have to mess with these ones down here either all the defaults are usually just fine then click on next to go to step four this also takes a few minutes sometimes so just let that run now we're at step 4 or 4 which is the testing stage it says here log in to the administrator section to finalize the setup so click on site login I'll take you to the login form and you'll notice we're in a different domain now we're not different well my case is the same domain but a different subdomain before I was on learn WPF comm now I'm on the main route so that has gone okay so far LastPass has Auto filled my login credentials very handy this would be the login details for the redesigned site if they're different if they're the same don't worry about it it was login to see if everything works so we've successfully logged in we have a migration almost complete message up here saying we have to remove some installation files we include on this link to go there right now so go ahead and do that and then it's going to delete the Installer dot PHP file and the archive actually possibly not the archive from out through that manually but definitely installer file so it doesn't cause any problems so we click on remove installation files right here and then that will remove any files it deems necessary and what we're also gonna do is head down to our settings and then permalinks and we're not gonna make any changes to this page we're gonna scroll the bottom and click on Save Changes and that will rebuild our permalinks because sometimes transferring HT access files causes problems and rebuilding them this way fixes problems so I always do that when I move a site and if we go back into our file manager actually for us to go to the home page so if we go to the home page we see we still have this man's message this has got to come down and we've got to see what we've created hopefully we've transferred the site successfully so here's the file manager there's the old sites and this is all the files of the new set that we transferred over and that archive is still there see if I reload it's still here so we're gonna go ahead and delete this archive we don't need it anymore it's also on my hard drive so I'll have to have it in two places I'm going to keep this old site because we can always revert back if we turn off the front page that's broken click revert back to the old one so I'm going to change the file name of this index file back to gibberish moment truth go to the front refresh this page and this looks a lot like the site that we had initially check the domain name we're on the root and over here go to the home page we're in the sub domain here and they look identical which is exactly what we want you want to click through all the links just to make sure those are all working properly you definitely want to test stuff to make sure everything is where it's supposed to be and everything appears to be fine I'm not going to bore you as I click through pages to make sure they work but you just click through them if they work they work it's fine awesome side note is we have our SSL certificate applied to the root domain that wasn't applied to the subdomain but it's on the root and it's automatically applied to our site transfer which is pretty fantastic and one more fun note this is really quick so in here we were changing the index file so we just had index.html and I replaced our home page I've seen websites that were hacked by a hacker and all they did was upload their own index.html file they didn't do anything else so they replaced the home page with their hacktivist message and then to clean it up all you had to do was go in go to the index.html file click delete and the hack was cleaned up then of course you want change your passwords and all that stuff - that was actually one of the easiest hacks I've ever cleaned up in my life so it's just one file super simple anyway that's just a nice side note and we're all done migrating this site that's how we migrate from a subdomain to the live site if you have any questions or run into any problems please leave a comment down below this video if you haven't done so yet click Subscribe then click the bell notification icon so you don't miss anything and with that out of the way click on one of these videos that popped up on the right hand side so you get even better at WordPress and until next time keep crushing it and I will see you in the next video
Info
Channel: WordPress Tutorials - WPLearningLab
Views: 58,116
Rating: undefined out of 5
Keywords: migrate wordpress from subdomain to root, migrate wordpress subdomain, migrate wordpress site to subdomain, move wordpress from subdomain to root, migrate wordpress, migrate wordpress site to new host, migrate wordpress from localhost to server, migrate wordpress website plugin, migrate wordpress website to new domain, migrate wordpress website to new server, migrate wordpress site, migrate wordpress site to new domain, wplearninglab, bjorn, wp learning lab, xyzwp, bjorn allpas
Id: tXQrgFuNQsU
Channel Id: undefined
Length: 16min 51sec (1011 seconds)
Published: Fri Sep 15 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.