How can I import my database downloaded from my sharedhosting
Hi! Please I will really need a guide on how to do this. Let me explain.
I have my wordpress website running on namecheap but decided to move to linode. I have managed to install a wordpress site on linode using their one click wordpress app installation.
The problem now is that I dont know how to go about importing my downloaded database name "localhost.sql" into the new wordpress installation on my new host linode.
I have installed ftp and I can see everything like var/www/wordpress
but now I dont know how to upload the database named "localhost.sql" which is on my laptop downloaded folder.
Please guide me step by step if you have the time please. Thanks.
My site is can be accessed on this link.
3 Replies
@skd4 --
You shouldn't use ftp(1) to your Linode…it's insecure. Use sftp(1) instead. I'm assuming you can use ssh(1) to access your Linode from your laptop so you should be able to use scp(1) to copy files from your laptop to your Linode securely (sftp(1) is part of ssh(1)).
sftp username@linode_name_or_ip
Password: ********
Connected to linode_name_or_ip.
sftp> lcd \the\location\of\your\file
sftp> cd /home/username
sftp> put localhost.sql
Uploading localhost.sql to /home/username/localhost.sql
...
sftp> quit
et voilà…your file will be transmitted securely from your laptop to your Linode. Substitute username & linode_name_or_ip appropriately…
See man sftp
. Your next question will be about how to restore your wordpress database from your SQL file. I'm not qualified to answer that.
-- sw
P.S. You should uninstall ftp(1) from your Linode and make sure traffic on ports 20 and 21 (ftp-data & ftp respectively) is blocked by your firewall (for both IPv4 and IPv6). These ports are frequent targets of hackers.
ok thanks man. I will be happy if you can answer the next question you pointed out. Lolz.
I appreciated you. But my other question is….I understand the part that I should not use ftp rather sftp which is what it says here. I used PuTTY to generate my ssh keys.
For my own case WordPress is installed in var/www/wordpress
inside same folder i see html var/www/html
Now you said I should upload this file where?
Or anywhere I like? I mean the localhost.sql I downloaded from my other host.
Then the last question about the one you are running away from answering.
how to restore my WordPress database from the localhost.sql and make all those of my post show up.
Please help or anyone that can help me. I have about 600 post in it and my traffic has been messed up that I have no hope of getting this back unless I continue with the fresh installation which I have already done. Which looks like starting the all over again.
Thanks and I thank everyone who will come in to assist me. Am in need of help here please.
@skd4 --
You write:
<snip />
I used PuTTY to generate my ssh keys.
See https://www.ssh.com/ssh/putty/putty-manuals/0.68/Chapter6.html
<snip />
Now you said I should upload this file where?
Or anywhere I like? I mean the localhost.sql I downloaded from my other host.
You can put it anywhere you like as long as mysql_restore(1) or whatever it is that you use to restore MySQL databases from dumps can read it.
<snip />
-- sw