WordPress website transferring from remote to local machine

WordPress website transferring from remote to local machine, it is a necessary when it comes to backups or testing. This tutorial is all about WordPress website transferring from remote to local machine.

Before we starting, we need the backups of Database, Website folder ((Normally, everything inside public-html folder of the server).

1.) Backup of Database

2.) Backup of website (As a zip format or everything from public-html folder of the server)

3.) Login credentials, etc

On your local machine, create a database withe the same name (you can give your own name.But, you have to update it in the database backup file. For eg: in the sql file, you will see the database name. Just replace it with your.).

Steps

1.) Upload the database to the local machine

2.) Extract the zip file of the website back and place it in the correct folder.(If you are copied from public_html, just copy the files)

3.) Update the wp-config.php file in the root directory, with the correct database name, database user, and database password

4.) Since, the URL is different on the local machine, update the URL in the table: wp_options.

5.) If there is any .htaccess file exists in the root directory, please remove it and create a new one with the following configurations :

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Note: Any previous custom configurations must be saved for updating. Also, the configurations added by plugins will be auto-generated later.

6.) Update the new URL with a plugin called Velvet Blues Update URLs

7.) Now you can access the website. That’s all. Also, when you are moving the site to remote, follow the same procedures.

Thanks for reading WordPress website transferring from remote to local machine. Drop your comments, questions etc on the comments section.