I’ve completed my install using wp-cli. Right now the server is only available within my organization’s VPN and the domain (say, foo.org) is being used by the existing (non-WordPress) site that will be decommissioned once this new WordPress site is ready.

When I installed WordPress, I set the url to the domain we plan to use once the website is ready (foo.org). While under development, the website will be accessed in the browser at its IP address (say, 192.168.0.0).

This leads to a problem where none of the assets load when I visit the site at https://192.168.0.0. For example, it tries to find the stylesheet at this non-existent address:

  • https://foo.org/wp-content/themes/twentyseventeen/style.css?ver=4.7.2

From a cursory Google search, I gather there is some technical reason why WordPress doesn’t use relative URLs for these assets.

With that, is there an established convention or best practice for dealing with this situation?

4 Answers
4

I normally just map my hosts file to the correct IP. This would work if you were only wanting to work on a site from your box only.

Only benefit to this option, as opposed to others, is that you wouldn’t need to change any of your WordPress settings to go live.

Leave a Reply

Your email address will not be published. Required fields are marked *