migrating WordPress from remote server to localhost
-
Hi,
I want to configure my current running wordpress site on localhost for some development process. I tried but it is not working on Localhost
steps I have followed:
1. I made .zip file of complete files and folders present in public_html
2. Downloaded it on my local machine
3. made a new folder by name wordpress in www folder of wamp
4. unzipped the downloaded file in the new wordpress folder
5. Took a backup of running wordpress site using Sql Yog, file name word.sql
6. Opened the word.sql file on editor and changed the url of current running site https://example.com to https://localhost/wordpress by replace all option.
7. Made a new database in my wamp by name word
8. imported the updated word.sql file using phpmyadmin on my local machine in new word database and found all tables fine.
9. Opened the wp-config file and changed the user name to ‘root’, password as ” and host name as ‘localhost’
The default wp-config file running of server have codes as below:define('DB_NAME', 'word'); define('DB_USER', 'word12'); define('DB_PASSWORD', 'word123'); /** MySQL hostname */ define('WP_SITEURL','https://example.com'); define('WP_HOME','https://example.com'); define('RELOCATE',true); define('DB_HOST', 'word12.db.86814.example.com'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', ''); define('VHOST', 'no'); $base = '/'; define('DOMAIN_CURRENT_SITE', 'example.com' ); define('PATH_CURRENT_SITE', '/' ); define('SITE_ID_CURRENT_SITE', 1); define('BLOGID_CURRENT_SITE', '1' ); define('WP_MEMORY_LIMIT', '256M');
I made changes in the file as below:
define('DB_NAME', 'word'); define('DB_USER', 'root'); define('DB_PASSWORD', ''); /** MySQL hostname */ define('WP_SITEURL','https://localhost/wordpress'); define('WP_HOME','https://localhost/wordpress'); define('RELOCATE',true); define('DB_HOST', 'localhost'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', ''); define('VHOST', 'no'); $base = '/'; define('DOMAIN_CURRENT_SITE', 'localhost' ); define('PATH_CURRENT_SITE', '/' ); define('SITE_ID_CURRENT_SITE', 1); define('BLOGID_CURRENT_SITE', '1' ); define('WP_MEMORY_LIMIT', '256M');
tested with making define(‘VHOST’, ‘no’); as define(‘VHOST’, ‘yes’); also. However whenever I am running https://localhost/wordpress it is getting redirected to original site https://example.com or on changing the other codes it is giving data base connection fail error.
In my database table are present with perfix wp_1 and wp_254 and wp_251. (not sure why)
waiting for help from forum now…Regards
- The topic ‘migrating WordPress from remote server to localhost’ is closed to new replies.