I would like to ask for help with this problem. I have two places where I have the same WP.

1) Test site - own domain, hosting and DB - here is stored database, so siteurl is here, example: test.com and everything in wordpress is using this domain

2) Localhost development - Problem: I want to use same database from test site, but url in .htaccess will be different same as in the DB.

Is there any possibility to use database from test site on localhost in order to maintain everything function correctly? I would like to create posts on test site, not on localhost. Localhost is only for webdesign development.

Thanks a lot.

  • 1
    How is this a wordpress specific question? just connect to your test DB from you local host WP. – Mark Kaplun Jan 27 '16 at 14:51
  • Very specific. Because when i connect it, site_url says "test.com" not localhost, so every article and page will not be working on localhost, but on test.com – Ernedar Jan 28 '16 at 10:07
  • In your local hosts file define test.com to point to and edit your server configuration so it will handle it properly – Mark Kaplun Jan 28 '16 at 10:41
  • Ok. You have my attention, can you give me an example pls? – Ernedar Jan 28 '16 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.