Surbhi Gupta
Surbhi Gupta

Reputation: 91

Wordpress Site complete move from one server to another wordpress

I have a multsite wordpress running on server, i want to shift my site to another server. I downloaded complete file backup by filezilla ftp Also exported complete database.

Now i imported this backup to new server(Aws Lightsail) and also replace complete wordpress by this backup wordpress. But new url is displaying blank even after i changed site url etc in wp_option table.

Please let me know where i am lacking.

Upvotes: 3

Views: 679

Answers (1)

Kaspar L. Palgi
Kaspar L. Palgi

Reputation: 1502

Here are the steps for moving WordPress or whatever another web app from one webserver to another webserver. Before you start you need to know the absolute path to your WP root folder. Write it down.

  1. Download all files. Don't download all the files via FTP as there are really many files and there might be some problems downloading maybe one or more important ones. Instead: a) if you have SSH access compress your WP root folder eg. tar -zcvf mywp.tar.gz /var/www/mywp.com and then download it; b) use some file manager from your hosting control panel (eg. cPanel, Plesk, DirectAdmin, etc) and compress your WP root folder from there and download.
  2. Download MySQL database dump. Check from wp-config.php file what is the name of the database used, username and password. Write it down and then either: a) from SSH do command: mysqldump -u [uname] -p db_name > mywp_db.sql and then download mywp_db.sql; b) use phpMyAdmin if you have it in your hosting control panel or just somewhere installed. Pick from the left panel the right database and then on the right panel top menu pick "export" and from that page "GO" button. Download.
  3. Unpack the tar.gz with 7zip for example at Win and have also the database SQL file in the same folder. Note the path of your all WP unpacked files and an SQL file. Eg. in Win C:\myfiles\wp_download\
  4. Write down the root folder path in the new server. It could be the same /var/www/mywp.com but it could be also for example /home/mywp.com or something else. Especially if the domain name doesn't remain the same.
  5. At your local WP downloaded files/db folder find and replace in all files old path to WP root folder to the new one. For example, at Win, you could use FNR for that. Browse to the right directory at the top. Eg. C:\myfiles\wp_download\ then into "Find" enter in this example var/www/mywp.com and info "Replace" enter home/mywp.com and click "Replace" button at bottom right. If your domain name changed then do the same replace in all files from old domain name to the new one.
  6. Create a new database at the new server either from the control panel or from command line. If you can't create the database with the same name, username and password by some reason then you have to also add into wp-config.php the new details. Also, make sure the database hostname. At most cases, it's "localhost" though as the DB is in the same server.
  7. Import the database SQL file into new server either via phpMyAdmin (left menu click in the right DB and top menu "Import") or upload the SQL file to the server and then from command line: mysql -u username -p database_name < file.sql
  8. Go into your local folder where are all the files and pack all the files (except SQL) in into ZIP for example mywp.zip and upload to WP root folder and unpack them there from control panel's web file manager or from command line unzip mywp.zip
  9. Change wp-content folder permissions to 777 from command line chmod /home/mywp.com/wp-content or from control panel's file manager or via any (S)FTP client.

Upvotes: 2

Related Questions