There are a lot of reasons why you would migrate a website. Upgrading to a different or better web host, changing domain names, consolidating websites, moving server location... The list goes on. But why would you want to do it manually? Sometimes there is a custom implementation of wordpress. Meaning that you, your company or somebody else has setup their own instance of wordpress instead of setting it up through a managed hosting platform like through GoDaddy, Hostinger, Bluehost, or flywheel. The reasons why you would do that are also varying. Some of those reasons could be that you/they want more control over privacy, customizability. It's also cheaper if you're a hobbyist and have the ability to do it.
Another valid reason is that you just want to dive into the world of Wordpress, self-hosting, servers, linux and everything these worlds has to offer. Setting up your own server with wordpress on it is an amazing first step to programming because it gives you some backend experience with the server itself, databases, php, Linux, and web servers and at the end of it you'll have a website where you can share what you've learned to future employers as your portfolio
To do this we will be leveraging tools on Linux which is the operating system most servers use. We will specifically be using Ubuntu 24.04 but the steps and commands are not specific to this version of Ubuntu and will most likely work on all Ubuntu versions you will come across. The reason I can assume the commands will be there is because all of the commands and steps we're going to use are usually required to setup Wordpress in the first place. That doesn't mean that those tools can't be removed after Wordpress is setup it just means that they're likely still there, although it is possible someone removed them. If you have the right permissions they're not hard to reinstall.
The main tools and commands we will be using are SSH which stands for Secure Shell It is simply a way to connect remotely to a different computer. You might be doing this on your local computer (maybe the computer you're reading this on) but that's often not the case so we'll show you how to do it remotely but these steps apart from the SSH portion will apply to your local computer as well.
Other tools we're going to use that already exist on the host computer are a command called SCP secure copy used to transfer files over ssh. We'll use mysqldump used to export your database. tar, used to compress files and then just regular navigation commands.
Whether it's because you want to learn or you have to because your task doesn't allow for the extra tools, we will get the job with tools that already exist on the host system.
Here are the ingredients, parts, tools, permissions you'll need to make this happen. Don't worry I'll show you where to get it all: