Why we are discussing on this topic because we are here to tell you when any developer of WordPress wants to test new themes, plugins, or another development testing. then he creates a local setup of any WordPress site. so let’s look below how to do this?
first of all, you have to take a backup of WordPress site and create a database for it in your localhost/phpmyadmin. Click on New button for creating a new database ( eg. aiaviation ) and put a name for database and click on create button.
Step 2: then take database backup and import in the database and click on Go button.
Step 3: put the backup file in your xampp location (eg.: C:\xampp\htdocs)
Step 4: Then go to your backup file location and open wp-config.php file in editor
Step 5: Then change to your wp-config file like- ‘DB_NAME’, ‘DB_USER’, ‘DB_PASSWORD’, ‘DB_HOST’ and add below two lines to your wp-config file
Step 6: now go to your database and select your options table and change siteurl & home column url
Step 7: Now you have to edit your virtual host file httpd-vhosts.conf and hosts file. for this, you have to open notepad as administrator.
Step 8: add this lines to hosts file
Step 9: after that add below lines to httpd-vhosts.conf and change DocumentRoot, ErrorLog, CustomLog and Directory location with your site name and location.
Thanks for supporting us and if you have any question then comment us we will give you the best solution to this topic.
- How To Set Up Apache Virtual Hosts on Ubuntu 20.04.2 LTS - October 28, 2021
- How to Fix ” Vue packages version mismatch:” error in Laravel 5.5 - April 15, 2021
- Laravel say that Auth guard [user] is not defined - April 15, 2021