Viewing 5 replies - 1 through 5 (of 5 total)
  • I think you are mixing up a localhost website and a real website. Why you can not see this on your phone is because it is localhosted on your computer. You probably downloaded a software like XAMPP, MAMP, or VVV. Localhost websites can only be seen on the computer you created it on.

    In order to get it to show online from any device you need to get a domain and hosting. Then you can install WordPress on that and transfer the stuff over from your localhost install.

    Matthew is correct, but assuming you wanted to turn your computer into a web server could be (difficult, but) possible.

    Matthew is correct, but assuming you wanted to turn your computer into a web server could be (difficult, but) possible.

    I would not recommend this in the least. Thanks for the suggestion @theunknownanonymous but turning your computer into a web server is dangerous. I would only recommend this if you have loads of experiences and/or hire people full time to manager it. But still going for premium hosting instead of doing it yourself is way more secure and faster.

    Hey,

    Matthew is correct how could manage your computer as server 24 hour,and what happen when the traffic of site increase,I mean to say it’s very difficult to manage your computer as server.

    I concur with the other responses that you should not put your computer onto the internet as a server. BUT there is a big difference between that and just making your site available to your phone.

    Firstly you must reconfigure your localhosted WordPress website away from using localhost to using a regular website name, for the moment you can just makeup any name, it need not be registered now or ever, if you plan to get the website hosted and accessible on the internet then you could start using that name now (even if you have not registered it yet). For the sake of this demonstration I will use “example.com”

    Install and use the plugin DUPLICATOR to prepare your site for this logical (though not physical move), you will not need its help with moving the files, but you will need the modified database it will produce.

    Now create a new database with a new name, load the modified database into it, keep the same database user and password. Make a safe copy of your wp-config.php file and change the database name in the working file.

    Now reconfigure your web server to use the “Virtual Host” method, details here:
    https://httpd.apache.org/docs/2.2/vhosts/
    You will have a configuration block that looks like this:

    <VirtualHost *:80>
    DocumentRoot (whatever path your web server files live at)
    ServerName example.com
    ServerAlias www.example.com
    </VirtualHost>

    Now edit your “hosts” file on your PC to instruct your browser to use your localhost webserver when it sees your name, line like:

    example.com 127.0.0.1
    www.example.com 127.0.0.1

    Your website will now operate on your localhost browser as:
    http://example.com

    Now for your phone, you need the IP address of your PC, available from your network interface properties or using a program like “ipconfig” or “ifconfig”, find the details of your phone’s OS at this page:
    http://en.wikipedia.org/wiki/Hosts_%28file%29
    And add lines to the “hosts” file like:

    example.com (server ip address)
    www.example.com (server ip address)

    Now you will be able to view and test your webiste from the browser on your phone, but only so long as your phone is on the same LAN as the server.
    It would be possible to setup port forwarding and so on in your internet modem/bridge but this is getting far too complex.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do i change my url from localhost?’ is closed to new replies.