TL;DR – don’t use automated solutions. Do it properly and do it manually!
Create a temporary directory to work in:
Time to dump the MySQL database! It’s not that hard.
Quick note before you run this – this is assuming your MySQL installation authenticates via UNIX sockets. If you have password authentication I suggest moving away from it if your MySQL database is on the same server as your WordPress site. Less chance of things getting messed up and you don’t have to remember yet another root password that could be leaked.
If it prompts you for your sudo password, supply it. If it prompts you for your MySQL password, then you’ve done something wrong.
Now you need to copy the static files and what not. Run:
-a flag tells the
cp program to copy over all attributes. It doesn’t always work, however. In my case it rewrote the
www-data user to
ideaman924. Nothing a simple
chown can fix, though!
Time to tarball the entire thing. Back out and then run:
You’ll get a neat tarball you can throw on Google Drive or something like that! Wasn’t that easy?
Get the tarball and unpack it:
Go inside, and then run:
Restore permissions if required. Done!