0

So a little background. I have my WordPress development site backed up on a remote git repository. I added a ignore file to ignore specific files so that if the repository is cloned the site has to be set up like any other fresh WordPress site.

After creating a new clone on my local machine I exported all content from my live development site using WordPress build in exporter and than imported that into my local install.

That worked all fine, the content is there, but if I click on a post their url is not pointing my localhost as the domain name, but the domain name of the live development site.

The url in WordPress setting page are all correct. Can it be that the Wordpress export file added the domain to the posts? I just don't understand how this could happen. Anybody that recognizes this issue and know how to avoid it?

7
  • Did you perform a search and replace on your data to change old domain to new local domain? Commented May 14, 2015 at 5:13
  • No, I did not modify the xml. Is that a common practice, to have to alter the content of the exported xml file before trying to import it? Commented May 14, 2015 at 5:17
  • When changing domains, Yes, but before explaining further, what do you mean when you click on a post the url is not pointing to localhost? Where are you when you are clicking in the post? Commented May 14, 2015 at 6:32
  • Also, this article in the codex about Moving WordPress might be helpful Commented May 14, 2015 at 6:35
  • They way I would think the import/export feature should work is to create local versions of the posts from another installation. In my case I'm on the frontpage where I have a query that gets list of resent posts. If I view it in the admin the article has a permalink using the localhost which would be correct, however the query is getting a guid with the domain from the other installation, that is the live develoment side that is not localhost. So if I click on them I end up viewing the post on a different domain. Commented May 14, 2015 at 19:10

1 Answer 1

0

Hope You have imported it correctly.

But I'll suggest you to try sql dump. Export sql dump from your database and import it in your local system. It will work correctly.

1
  • I don't want people with access to the repository necessarily have access to the database, that's why I want to try to understand why WordPress import/export is failing this way. Commented May 14, 2015 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.