My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How do I create a local copy of a live Wordpress site?

estevan carlos benson's photo
estevan carlos benson
·Jun 9, 2017

I am following instructions from this example online: webnots.com/how-to-move-live-wordpress-site..

When I get to the part where I import an SQL db into a local server, I am instructed to do an SQL query that replaces the old URL with a new one. This is where problems occur.

"Step 5 – Replace Live Site URL with Local Site URL in Tables"

I am getting different results unfortunately caused by factors I am unclear of. The best result so far is I was able to view the homepage of a local website copy but images would not load and link URLs were broken.

My questions:

When I run the query to replace the original URL with local URLs do I need to specify the port number? I am using MAMP to create my localhost and I currently have the default port, 8888. In other words, do I need to write this:

localhost/mysite

Or do I write this:

localhost:8888/mysite

Additionally, can I write something like this?

localhost.dev:8888/mysite or localhost.dev/mysite

What is the proper way to create the URLs on my local host? Finding an answer to this may not resolve my problem of a broken web page but at least I'll have a better understanding of the concepts involved.