The scenario is that you have an app running on a cloud server, but you want to make massive change to it. The best way is to copy the app to your local server (your computer).

Here, I’m going to show you the most popular method, using XAMPP. Download the latest version of XAMPP here https://www.apachefriends.org/download.html

Screenshots of the installation steps are shown below.

Image is loading...

Now start the Apache and MySQL. If you enter an error that prevent Apache and MySQL from starting, find solutions here.

2. Fix error

Find out what’s blocking port 80 / 443 on Windows

This is how you find what task that is currently listening on the default HTTPS-port 443. Open the Command Prompt (cmd.exe) and execute the following…

Step 1 –  Find pid of program:

netstat -a -n -o | find "443"

The list could be long. Look for something ending with :443 in the second column. Get the pid from the right most column (e.g. 37400)

Step 2 –  Find the name of the task with PID 37400:

tasklist /svc /FI "PID eq 37400"

The output should give you the name of the task that is blocking your port.

Normally it say PID as 4, is the World Wide Web Publishing service. To disable it, search services.msc into Windows search box

Click on top of Name column to sort by Alphabetical order, and look for World Wide Web Publishing service. Right click, click on “Property” to open the new window.

Then choose Status Type: Disabled. Click on “Stop” button to stop the service and click OK. That’s it

3. Clone your script from live server to local server

  • Backup your live database: Log in to Cpanel -> PhpMyadmin -> go to your database -> export the database as .sql file
  • Backup your script: Log in to Cpanel -> File manager -> go to your site folder -> compress and download the entire website folder script.

4. CREATING DATABASE and Import live server’s database

  • Open the PhpMyAdmin link http://localhost/phpmyadmin or click on Admin button for MySQL in the XAMPP Control Panel
  • Now Enter username and password(As a default, the username will be root password will be empty).
  • Click on the New tab to create new Database
  • Enter a database name as the exact DB name as your live server’s database. Then click Create
Image is loading...

Add a DB user for this database, go to Privilege and click on Add new user, enter the same db user and password as live server database. For Host, select “localhost” from the drop down. Assign all privilege to this user, and click “Create”.

Once you have created the database for the project, you need to import the database from your live server.

5. Copy files to local servers.

  • Go to C:\xampp\htdocs\, if you see the intial files in this folder created by XAMPP in its installation, simply delete everything in this folder.
  • Copy your entire script to this \htdocs folder.

6. Test out

Once you have completed all these step, open browser and enter the URL localhost/[script-folder] to see if it shows the website as the live server. If it does, you’re done!

If it opens the live server instead, you need to locate config.php file and find the line that has the live URL, i.e: “https://yourdomain.com”, and change it to “” (empty string). Try again. While you’re at it, change “DEBUGGING”, false to true.

Good job!

Pin It on Pinterest

Share This