0

Im pretty new to networking and am trying to build my first website. I've set up my lamp server and created the site on localhost. Now I've got my domain pointing to my IP and port forwarding is set up on my router for it. Problem is, I can only access the site from a mobile device but even then it doesn't render fully. It only gives me text. If I try to click on any links, it tries to open localhost instead. On anything but a mobile browser, the page doesn't load at all.

I tried editing siteurl and home in the wp_options table to point to http://myip but when I try to save it, I get logged out. When I log back in, both settings are back to http://localhost.

Any clue on the issue? I think that solving the siteurl/home issue would also solve the first problem. So how do I get it to save these settings?

UPDATE: I added the following code to the wp-config.php file. define('WP_HOME','mysite.com'); define('WP_SITEURL','mysite.com'); Now its all working for the most part but my home link still tries to take me to localhost. Also still having the same issue with the site loading on phones only.

  • UPDATE: I added the following code to the wp-config.php file. define('WP_HOME','mysite.com'); define('WP_SITEURL','mysite.com'); Now its all working for the most part but my home link still tries to take me to localhost. Also still having the same issue with the site loading on phones only. – Rex Linder Jul 4 '16 at 3:54
  • Rex, please always add updates as edits to the question. Thanks. – kaiser Jul 4 '16 at 10:01
  • Okay, I will in the future. Sorry, still learning the rules here. – Rex Linder Jul 4 '16 at 16:52
  • Can you then please file that edit to the question? Thanks. – kaiser Jul 4 '16 at 16:57
0

Simple solution for this problem would be to extract your database to .sql file. Then find http://localhost and replace it with http://yourip. Then drop previous database and re-import the corrected one.

Please let me know if it worked for you.

Your Answer

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

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