Change language

How to set up PHP development environment on Windows?

Steps to set up a PHP environment on a local machine.There are two main ways to set up PHP on a local machine:
  • Using just one package (XAMPP & amp; WAMPP) ... (recommended)
  • Manually install all required packages (MySQL, PHP and Apache) and configure them.
We will cover a simpleand almost error-freemethod to install PHP on a local machine that uses everything in one package called XAMPP .Steps to install XAMPP:
  • Download XAMPP:You can download XAMPP software from the official site here with latest Windows and latest PHP.
  • Open the downloaded .exe file.After opening the downloaded file, you will see pop-up from the window, click "Yesand continue.
  • Click Next:you will see the XAMPP welcome window as shown below, click Next ”
  • Select components:Select the components you want to install. Please select the MySQLand phpMyAdmincomponents, all other components are optional for this tutorial. 
  • Select an installation location:select a location whereyou want to install XAMPP, the default is C: / xampp
  • Click Next.After clicking Next, it will start installation. 
  • Open the XAMPP control panel.After successfully installing XAMPP on your local On your computer, open Control Panel by searching the Windows search bar "XAMPP Control Panel" or by navigating to the XAMPP installation directory. You will see a window as shown below. 
  • Configuring Apache *:This step is not required,i. e. If you have problemswith Windows 10 related to a blocked port
    Open the config file for Apache as shown in the picture below. 

    Press CTRL + F and find LISTEN 80. Replace port 80with something like 81and save the file and restart the control panel. 
  • Start the Apache server.Start the Apache server by clicking startupand you will see the port number right before the Apache column. You can stop the service at any time and start any service by simply clicking the Start button. 
  • Verifying installation:go to your browser and type localhost: 81(or just localhost,if you haven’t changed the port). You will see a page as shown below. 
  • Verifying PHP installation:create php in the htdocs folder in your installation folder. (C: / XAMPP / htdocs) and add the following code to it. echo phpinfo(); ?> Save the file as demo.php and go to your browser and enter localhost: 81 / demo.php (or just localhost / demo.php,if you haven’t changed the port). 
    If the installation went well, you should see the result as shown below.If all of the above went well, congratulations! You have successfully set up your PHP development environment on your local machine.

Shop

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Best laptop for engineering student

$

Best laptop for development

$

Best laptop for Cricut Maker

$

Best laptop for hacking

$890

Best laptop for Machine Learning

$950

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method