Question

Migrating web from shared hosting (I read some questions but they are no help)

Hi, there are a lot of questions about this topic, but none of them point at the questions I have. I’m migrating from hostmetro and I have a domain there. I’m following this guide:

https://www.digitalocean.com/community/tutorials/how-to-migrate-wordpress-from-shared-hosting-to-a-cloud-server-with-zero-downtime

but I’m stuck in the step 4: sudo nano /etc/apache2/sites-available/yourdomain.com

My wordpress is installed on the OS ubuntu 14.04 using the IP address I can access to it, so to install the old wordpress on the server, do I write where it says “yourdomain.com” my hostmetro .com domain? and on “sites-available” my ip address from digitalocean?

I’m also trying to transfer my domain, this guide includes that right?

Thanks for the help!

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello, Actually, based on that tutorial, on step 4, if your domain is www.bob.com, you should write sudo nano /etc/apache2/sites-available/bob.com But this tutorial is a little bit old, you should add the .conf extention at the end now, so sudo nano /etc/apache2/sites-available/bob.com.conf

To see how to transfer the domain, take a look at the step 7 of that tutorial. Hope this help, do not hesitate to reply here, I know it can be hard to setup your first server.

Lasst last last question, I need to upload the .sql manually, where do I upload it in the directory? It’s not compressed

lol I can’t reply to your post, too long.

That guide helped me. I updated the nameservers. Now I’m just waiting, finger crossed hahaha

Thank youuuuuuuuuuuuuu!

Perfect, it worked. Thanks you very much!

Another question please:

I’m on step 5 now, I can’t upload it thorugh the comand line because it keep saying no such file or directory, so I can do it ftp.

Where do I upload the files? (db and wp-content) and are these two the only files I need to migrate a whole web?? I have a backup of all the files.

On step 5 it says:

scp ~/Downloads/backup_db.sql.gz username@server_ip_address: scp ~/Downloads/wp-content.zip username@server_ip_address:

but I’m trying to do it FTP, do I upload them in the root directory or the wordpress directory?

and when restoring the database:

mysql -h localhost -u database_user -p database_name < backup_db.sql.gz

on “database_user” do I write my user from the digitalocean sql wordpress or my old hosting sql? on “database_name” do I create a new one or the same as above?

Oh one more thing, when I downloaded the sql from my old hosting I had it on the formal .sql, if I compress it, it will give me a format backup_db.sql.tar.gz and on the guide it says only .gz does it matter? I’m compressing it on ubuntu

Thanks again!