I’m currently working on a wordpress website using WAMP locally, I’ve got the site working fine on another local computer, however images aren’t showing they’re simply appearing as localhost/wp-content/etcetc instead of 10.0.1.2/wp-content/etcetc
CSS and everything else loads fine. Obviously the images load fine on the host computer, however I’m looking to setup so can work from LAN based machines too.
I figure htaccess would be a simple(ish) fix, if I at all knew what I was doing.
Basically could anyone point me in the direction of a htaccess code to directed localhost to 10.0.1.2 please?
Thanks!
The question you are asking is not the correct one – you do not want to change
localhost
to point to a specific private IP address or you will have issues with an unknown number of other things.To properly correct the issue you will need to go through the process of Moving WordPress – updating the URLs in the
options
,postmeta
, andposts
tables. This can also be achieved by exporting the contents of your site to an XML file, doing a search and replace on this text document (changelocalhost
to10.0.1.2
or whatever host name you want), and then re-uploading it. You will need to update thesite_url
andwp_home
values as well.Follow the steps:
This solves your problem.