I already have an existing website on live server. I want to setup on local machine.
Following Steps has been taken:
- Download whole website
- Place whole code under
htdocs/mywp
- Change the database file. replace all link from
https://www.example.com
tohttp://10.1.15.5/mywp
(my local IP) - Import the database and change the
wp-config
file - Deleted .htaccess file
Now, when I visit: http://10.1.15.5/mywp
The page load except for the styling (CSS). When I try to visit: http://10.1.15.5/mywp/wp-admin
It doesn’t open
it redirects to:
https://10.1.5.15/mywp/yourwp/login/?redirect_to=https%3A%2F%2F10.1.5.15%2Fmywp%2Fwp-admin%2F&reauth=1
Can anybody tell me what steps can be taken?
2 Answers
Sounds like you are still having content pointing back to your live URL, possibly. To ensure that you have changed all the URLs from https://www.example.com
to http://10.1.15.5/mywp
, follow these steps:
- Go and download Interconnect IT’s Database Search & Replace Script here
- Unzip the file and drop the folder in your localhost where your WordPress is installed (the root) and rename the folder to
replace
(screenshot) - Navigate to the new folder you created in your browser (ex:
http://10.1.15.5/mywp/replace
) and you will see the search/replace tool - It should be pretty self-explanatory up to this point: enter your old URL in the
search for…
field and the new URL in thereplace with…
field
You can click the dry run button under actions to see what it will be replacing before you execute the script. Once you’re done be sure to remove the /replace/
folder.