Support » Localhost Installs » Hosting on my own computer.

  • If I try to install WordPress on my computer, it wants to set it as “localhost”. But I have my own computer set up as an apache2 server and want WordPress to use mydomain.com as the server. How do I install WordPress so that I can access it through my LAN IP but readers would access it via mydomain.com?

    In addition, I have a web page installed on mydomain.com but have a separate domain that forwards to mydomain.com/wordpress/index.php

Viewing 3 replies - 1 through 3 (of 3 total)
  • If I try to install WordPress on my computer, it wants to set it as “localhost”.

    Just about no one hosts on their own computer, but it can be done.
    You need to setup your website using the VirtualHost technique here:
    https://httpd.apache.org/docs/2.2/vhosts/
    Then on your own computer, and most likely the other computers on the LAN you add your website name to their “hosts” file, details here:
    http://en.wikipedia.org/wiki/Hosts_%28file%29
    Then to enable world access to your website you either:
    A) Have a router/modem with a static IP address assigned by your service provider, in which case you set that address in your domain hosting, and then enable port forwarding through your router to your server.
    B) Have a dynamically assigned modem address in which case you must use a dynamic address resolution service, and follow their directions.

    How do I install WordPress so that I can access it through my LAN IP but readers would access it via mydomain.com?

    This is not possible, in your WordPress settings you have a “Site Address” and “WordPress Address” fields, these are by necessity the same for all viewers of your site. So computers sharing the same LAN must be able to locate your server by name, could be done as a local DNS server, OR by configuring each computer’s “hosts” file.

    In addition, I have a web page installed on mydomain.com but have a separate domain that forwards to mydomain.com/wordpress/index.php

    There are various things that can be done like “giving WordPress its own directory”, this may suit what you need.

    Hi, I am using MAMP 3.5 – i am really new to all this and it’s getting rather confusing now.

    I installed MAMP, downloaded the wordpress documents from wordpress.org, got as far as making a database in myphpadmin, and now when i wanna go to localhost:8888 i get a blank white screen. I have tried:

    – renaming the wp-config-sample.php file to wp-config.php and just changing the one part in the code to “true” to show any errors instead of a blank screen (i read somewhere to do that). But I still see a blank screen.

    I am not savvy with php or code, so i am very confused why it is not working this time around. I remember downloading (a previous version of) wordpress a couple months ago, and using mamp to set it all up and it worked just fine. This is the first time this is happening. I can’t get to the next step of “config” to indicate the database and username etc, in order to host my site locally while I work on it.

    I would appreciate if someone could urgently help me out here.

    Thank you so much!

    Firstly ALiesting, it is requested practice here for you to start a new thread when seeking support.

    It is my advice that everyone use the VirtualHost technique rather than going forward with using localhost, it is only a very few extra steps and produces a much better result. Details above.

    Meanwhile can you browse to “http://localhost:8888/readme.html”
    it will show a WordPress logo and your version number, this will work even if your database and PHP are not working, it is a good test that your webserver is active.

    Also your webserver will (or can) produce various logs and error reports, suggest your ask in the MAMP community where they are.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hosting on my own computer.’ is closed to new replies.