In this tutorial, I will show you how to host a website on your android phone using ksweb application.
It is possible to host a website using an android phone. The android phone will be used as the localhost from where the website files are being hosted and accessed. This method is strictly for people who want to do some web development using their Android phone.
You can turn your android phone into a complete web hosting by following the procedures I’m going to use in this tutorial.
HOW TO USE YOUR ANDROID PHONE AS A WEB HOSTING
In this tutorial, the Android app I will be using is the Ksweb Pro. This apps allows you to host your website files using your android phone. I will be using the pro version because it is fully loaded with unlimited features and not limited in any way.
Download the pro version of ksweb Here. Size is about 86mb. Install the application and launch it. When you are launching this app for the first time, it will require access to your photos, media and files in your android. Just click allow to give access.
It will start an automatic installation of MySQL, PHP, Apache and other dependencies of a web server or hosting.
After installation is completed, you will see the main interface of the ksweb pro app. It will look like in the screenshot below.
This is what you should note at this point :
The Default MySQL login username is “root” with a blank password! This is what you will use to access the phpMyAdmin on your web host.
To activate your phpmyadmin, simply go to tools and select phpMyAdmin. Select the lighttpd server and click on OK.
This will create the link to access your phpMyAdmin. The link is http://localhost:8001. To access the phpMyAdmin, just copy the link and paste on your mobile browser and visit the link. This link will also appear on the lighttpd tab on the ksweb pro app. You can click the link from there and it will automatically open on your default web browser.
This is what you will see when the http://localhost:8001 link is clicked.
To access the phpMyAdmin, use admin as username and leave the password box blank. Then hit the Go button. You are now logged in to your phpMyAdmin.
UPLOADING YOUR SITE FILES TO YOUR WEBHOST
You can upload your website files to your newly configured web host. Depending on the Content Management System(CMS) that you intend using for creating your website or blog, you can download the package from the official page of the CMS.
In this tutorial, I will be using WordPress. You can get the download the latest version of WordPress on the official WordPress.org website. Click on the Get WordPress link to download the latest version of WordPress. The installation file is archive in a zip format. After downloading the WordPress.zip file, simply extract it using winrar, rar or with your default file manager if it support unarchiving of such file formats. Extract the package to a folder on your android phone. Move the wordpress folder extracted from the wordpress.zip to your phone internal storage, htdocs folder. By default, the htdocs folder contains the index.php file. You can delete this or leave it there.
Make sure your ksweb web server is still active in the background. You can launch it again to confirm. If at any point the ksweb app is closed, you will get error messages while trying to visit any of the localhost link on your browser.
Visit http://localhost:8080/wordpress on your web browser. You will see the wordpress installation page like in the screenshot below.
Before getting started, let’s crease a database for your website. To do this, simply go to ksweb phpMyAdmin page. Login via http://localhost:8001. Use root as your username and leave the password box blank. If you login with admin as username, you won’t be able to create a database.
After accessing the phpMyAdmin using root as username and a blank password, click on databases.
Use wordpress as database name and click on create. You have successfully created a database for your web server. We are going to use this database for installing wordpress on your android phone.
Visit http://localhost:8080/wordpress again. Click on let’s go.
You will be redirected to a page where you will have to set your database name, username and password for your database. Please note the following. Use these values:
Database Name – wordpress
Username – root
Password – Leave blank
Table Prefix – wp_
Click on submit after setting it up like in the screenshot above. Then proceed to click on Run the installation.
Here’s is how your wordpress dashboard after a successful login will look like.
- The localhost is not powered by data connection. You do not require data to access it. Localhost is strictly for development purposes.
- If at any point, the ksweb server is forced close by your android phone, you will get an error. Make sure the ksweb app is always running in the background.
- Since this site is hosted locally, you are the only one that can access it.