I am following instructions from this example online: webnots.com/how-to-move-live-wordpress-site-to-lo…
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:
Or do I write this:
Additionally, can I write something like this?
localhost.dev/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.
Arthur Okonkwo
First of all the guide at webnots.com/how-to-move-live-wordpress-site-to-lo… is really a long one and as developers we want to make things happen ASAP.
So here's a better path ==> login to your WordPress Dashboard, > goto plugins and install the duplicator plugin wordpress.org/plugins/duplicator/, after that, locate the duplicator menu and create a package, follow the on-screen instructions to successfully build a package.
In the End, you'll have your entire WordPress site in just two files which is the INSTALLER & ARCHIVE. Download these files and copy them to you local development folder.
Note: you need to create a new database on your localhost before running the installer script.
To deploy the just downloaded files, simply goto localhost/folder/installer.php and follow the onscreen instructions to complete the setup.
If you feel lost/stuck at a point you can check out premium.wpmudev.org/blog/guide-to-migrating-local…