How to host & develop website locally on Android phone using | Full Tutorial

As we all know developing website online even with free server is a kind of expensive with data charges, and there are plenty of hosting companies out there, some expensive, some not. Some are dependable, some have terrible up time, and some simply shouldn’t be allowed to offer hosting. Even after looking through a list of some of the best options, finding the perfect hosting company can be a rather difficult thing to do. So why not host your site yourself even on android?

Thanks to your Android device’s capabilities, you can host a website by yourself. Note this is not meant to be the perfect solution for anyone and everyone. But, it’s helpful for developers who want to test their website or people who want to learn and test capabilities of their Android.

Here are the steps in developing and hosting a website with Android device:

Set up the Server

  1. Install and run PHPRunner to your Andriod device. I recommend PHPRunner because, the app’s full version to keep your site running is free and ease of installation. Other alternatives include My FTP Server (Free), KSWEB(premium) and Pixel Media Server (Free). For the purpose of this article we will be using PHPRunner.

Screenshot_20190618-133635-169x300

  1. Once opened, click on the Install button, a dialog showing the downloading of necessary files will popup, don’t worry this doesn’t involve data charges, it is offline.

Screenshot_20190618-195321-169x300

  1. Now, click on Root Folder , and select the folder you wish to install your website files, usually the one end with /htdocs, or you can set your own path, but I recommend /htdocs.

If it gives error showing, “On a flash drive does not have access rights, the phone memory has” click here on how to fix error: On a flash drive does not have access rights, the phone has or open failed: ENOENT (No such file or directory)

Screenshot_20190619-170950-169x300

  1. Click on Start button to start Apache, click on Download PhpMyAdmin to download files for managing database.

If it gives and error saying “open failed: ENOENT (No such file or directory)” click here on On a flash drive does not have access rights, the phone has or open failed: ENOENT (No such file or directory)

Screenshot_20190618-194521-169x300

  1. If you click on Site editor button, your browser should show information on the version of PHP you just install, this is because, you have no starting file like php or index.html , meanwhile you have successfully setup web host on your Android device.

Screenshot_20190618-200723-169x300

Making your Server accessible though the Web

You can enter the address http://localhost:8080 on any web browser like Chrome and Mozilla.

To development a website, you have to have the following tools: PHPRunner as guided above, Text editor like Quoda, Notepad++, and web browser.

  1. Now, go to your File Manager and locate htdocs on your internal memory, here you will find the phpmyadmin folder and the php which is the starting file.

Screenshot_20190618-201748-169x300

  1. Open and edit the index.php file with your text editor to this simple php syntax.

<?php
echo “Hello Hello!”;
?>

Save the file, and the result should be:

Screenshot_20190618-202247-169x300

  1. That’s, all you have successfully setup website on your android device and test run simple php syntax.

Source: wikihowdone

How to Install WordPress Locally on Android Phone

Extra

5 Likes