How to put xampp localhost website online?

24,899

Solution 1

An easy solution to show is to share your screen on a video call if you do not want to spend money on hosting. Or you can use teamviewer.

UPDATED ANSWER - MARCH 03 2018
Now you can use a tool called ngrok which provides a secure tunneling. You will get a temporary url for your localhost. More information is at

https://ngrok.com

Solution 2

You can follow below steps for this, I am assuming your website name is "myweb":

1) Go to your website folder in "Xampp/htdocs/myweb" and compress your website folder to make tar or zip.

2) Buy linux hosting from any hosting service provider. I would prefer hostgator.com. Just ensure they give "CPANEL" with this hosting.

3) After you purchase this plan, you will get URL and credentials to login to "cpanel". Login to "cpanel" by opening link "www.myweb.com/cpanel"

4) Click on option "File Manager" in FILES tab.

5) On left side panel, click on "public_html".

6) Then click on "Upload" on top panel.

7) Click on "Select File".

8) When upload finish come back in "public_html" folder and right click on this compressed file, click "Extract".

9) Ensure that when you are clicking on "public_html", you are able to view folders "wp-admin", "wp-content" etc.(and all other content of your website) on right side pane.

10) Now its time to set database. Go to "CPANEL" homepage again as we did in beginning and click on "MySQL Databases" in DATABASES section. Create new database, create new user, add user to database(give any password), give privileges to user for this created database.

11) Now go to "CPANEL" homepage again and then to "File Manager"->"public_html". Right click on file "wp-config.php" and select "Edit". Click OK. Now change 'DB_NAME', 'DB_USER', 'DB_PASSWORD' here. Give same values here as we did in previous step. Do not change 'DB_HOST', let it be "localhost".

12) Now we have website ready, database settings ready, its time to populate database with data we had in localhost.

13) So first we fetch SQL data from your local machine in form of SQL file. In your browser type localhost/phpmyadmin. Click on your database on left side. Click on "Export" on top panel. Select "Format" as "SQL". Click on "Go". Save the file anywhere and open it with any editor. Replace all occurences of "localhost" with "www.myweb.com". Save the file.

14) Now its time to import this SQL data into remote server. Go to "CPANEL" homepage. Then click on "phpMyAdmin". Click on database name you have created here before. This time click on "Import" and upload "SQL" file which we just modified on local computer. Click on "GO". You should see all your tables in this database now.

15) All set, just go to browser and type "www.myweb.com". Your site is up !

Solution 3

You can put your XAMPP server online without buying a hosting plan from web hosting provider, all you have to do is, get these followings.

  1. Allow external connections to Apache HTTP server through the firewall on port 80.
  2. Get a Static IP from your Internet Service Provider (ISP) (contact your ISP).
  3. Share the static public IP which you've got from ISP to your friend. you can access XAMPP locally using http://127.0.0.1/index.html now change the local IP with your public static IP lets say(http://10.123.53.X/index.html)

Solution 4

Its really easy, just go to a Free Hosting Provider that has no LIMITATIONS! Has mySQL Server Creation and With Unlimited Disk Space that can be Used (I personally Use it), it is ProFreeHost.com... Go Check it Out, and get a Domain (for example: mywebsite.ml or .tk) from Freenom.com, you can learn how to setup by watching a Video on YouTube!

Share:
24,899
R.Brahmbhatt
Author by

R.Brahmbhatt

Updated on July 09, 2022

Comments

  • R.Brahmbhatt
    R.Brahmbhatt almost 2 years

    I am new to the WordPress. I have a made WordPress website in xampp localhost, now I want to show that site to my friend before making it online without using any hosting services, but can not show him because it is on localhost.