S
S
Suil2020-08-04 10:41:41
linux
Suil, 2020-08-04 10:41:41

How to move website from linux server to hosting?

Good afternoon.
There is a website with a database on a local linux server.
From which there is only a login and password to connect via SSH.

Didn't deal with linux. Please tell me how you can upload the site files and database to your computer. So that in the future I can upload it to the hosting.

ps. Unfortunately, there is no connection with the programmer who made the site.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Victor Taran, 2020-08-04
@Suil

1. there is a console navigator in Linux, install mcit
2. go to the folder with the site
3. open the configuration file, copy the connection parameters to the database
4. being in the site folder, write in the console

mysqldump -uпользователь -p'тут_пароль' имяБД > имяБД.sql
(there is no space between -p and the login, as well as in the password)
As a result, you will get the site database in this folder
, see if it is empty
5. write in the same folder zip -r0 archive.zip .
wait for the command
to complete, the archive.zip file will appear in the folder
, all that remains for you install winscp on the computer or any other FTP client will
connect via SFTP with login and password from ssh (sftp - FTP emulation via ssh) to
take all the happiness to yourself.
If you write on skype I will help. shambler81

C
CityCat4, 2020-08-04
@CityCat4

Hire someone who can do it. By God, it will be:
- faster
- more reliable
(especially if this is the thousand-first online store that didn’t bother anyone to steal it)

S
Stalker_RED, 2020-08-04
@Stalker_RED

Find the directory where the site is located.
Find the login and password from the database in the code.
Copy just in case the settings of the webserver, database, php.ini, and exhaust from php -i.
Dump and archive

mysqldump -u USER -pPASSWD DBNAME | gzip > myDump.sql.gz
(or whatever database you have)
Zip folder zip -r foldername.zip foldername
Download via scp , for example.
Then upload to the hosting, unpack, upload the dump mysql -u username -p database_name < file.sql
Tweak the settings, read the error logs and guess why it does not want to work, and which software versions are different and what is missing.

D
datka, 2020-08-04
@datka

In theory: find the www folder and transfer it to the hosting. with the base it will be difficult to copy it and transfer it to the hosting too. And then you will need to tweak the site configs a bit so that it takes data not from the localhost, but from the new hosting.
Is the site self-written? or some kind of engine?

O
Oleg Shulepov, 2020-08-05
@neuro

Take CityCat4's advice It's
better to hire a specialist. With a high degree of probability, at best, you will not cope, and at worst, you will lose the site / database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question