Home » Blog » Web development » How to Install Multiple PHP and MySQL Versions on WAMP Server

How to Install Multiple PHP and MySQL Versions on WAMP Server

Updated:   Web development 6 min read

Your support helps keep this blog running! Secure payments via Paypal and Stripe.


Recently, I have been working on a WordPress site for a new customer. The client’s server is using PHP 5.5.38, which is an old version. The newest version is 7.x.x. However, the client doesn’t want to upgrade the PHP version yet. In order to develop and support smoothly, I need to install PHP 5.5.38 on my localhost. So when I develop, I will be sure nothing will break when I deploy to the client’s server.

For my development environment, I use WampServer 3.0.6. It comes with PHP 5.6.25. In order to add different PHP versions for WampServer, I need to upgrade my WampServer to the newest version first.

Update WampServer

  • Download the newest WampServer
    • In my case, I need to update to WampServer 3.1.9 (64-bit)
    • Visit WampServer Versions
    • Download the newest WampServer version. Look at the Wampserver Updates section. In my case, I downloaded the WampServer update 3.1.9
    • At your current WampServer, choose “Stop All services
    • If you have the antivirus application, you may disable “Protects Windows hosts files from changes” so the WampServer can make some changes in the Windows file without warning or error
    • Run the downloaded WampServer update execution file as Administrator – wampserver3_x86_x64_update3.1.9.exe
    • When the downloaded file is installed, it will ask for the WampServer folder. You need to check and confirm that the downloaded file is installed in the current WampServer folder. In my case, my current WampServer is d:\wamp64 folder.
    • After installation, you must restart the WampServer to see the change
    • If the WampServer icon at the taskbar disappears, you will need to run the WampServer application again, and then you will see the WampServer icon show up at the taskbar.
    • Test by visiting the test sites (http://locahost/example) on your WampServer to see if everything is still working as normal. Also, you should test the test sites that you set as a Virtual host (http://example.com).

Now your WampServer version will change to the newest version that you just downloaded and installed. In my case, it shows WampServer 3.1.9.

Install the PHP Version I Want

  • At the WampServer Versions, look for the Addons WampServer 3 section.
  • Find the PHP section and choose which PHP version you want to install into WampServer 3. In my case, I downloaded PHP 5.5.38.
  • Download the file. The file will be the execution file (.exe)
  • At your WampServer, stop all services
  • Run the downloaded file as an administrator
  • Install the downloaded PHP version you want into “D:\wamp64\bin\php“, which is the PHP folder in WampServer
  • After installation, you must restart the WampServer to see the change
  • If the WampServer icon at the taskbar disappears, you will need to run the WampServer application again, and then you will see the WampServer icon show up at the taskbar.
  • Test by visiting the test sites (http://locahost/example) on your WampServer to see if everything is still working as normal. Also, you should test the test sites that you set as a Virtual host (http://example.com).
  • Finally, if you disable “Protects Windows hosts files from changes” from your antivirus application, you must enable it again.

Install PHPMyAdmin and MySQL

If you want to install other addons, such as PHPMyAdmin and MySQL, from the WampServer Versions. You must update the WampServer to the newest first (follow the instructions from the WampServer site for updates). Then you can install the addons just like I showed you in the steps above.

For MySQL, after installing MySQL into the WampServer bin (D:\wamp64\bin\mysql) on your computer. The installed MySQL won’t have any database except the default databases from MySQL.

If you want to import the database from the other MySQL version to your installed MySQL version. First, you want to export the database with the mysqldump command in the terminal. The reason to use the mysqldump command is that it is fast. However, if you feel comfortable with PHPMyAdmin, you can export the database from this tool as well.

Using the mysqldump command, you can set the path in the global, or you can navigate to your mysqldump command folder in the terminal and run the export and import mysqldump command.

Example of my mysqdump command in the bin folder:

D:\wamp64\bin\mysql\mysql5.6.41\bin

Export a specific database via the mysqldump command:

mysqldump -u YourUser -p YourDatabaseName > wantedsqlfile.sql

Import your export database SQL file via the mysqldump command:

mysql -u username -p database_name < file.sql

And that’s it. Your development will flow and not waste time developing twice or breaking the production server.

Where to find the database you want in MySQL?

If you install the multi-MySQL versions in WampServer, the easy way to find which database you want is to look at the

wamp64/bin/mysql/mysql5.7.28/data“. In the data folder, you will find the database folder.

Here is a sample of a WAMP server after installing PHP and MySQL versions. Simply choose the PHP version or MySQL version you like, then WAMPserver will restart automatically.

Install the Apache Version I Want

  • At the WampServer addon, download the Apache version you want
  • After downloading, run the downloaded file as an administrator
  • In the installation process, it will prompt the WAMP server location as “c:\wamp“. You must check your WampServer location before clicking the next button. In my case, my WampServer location is in “e:\wamp64“.
  • Restart the WampServer to see the new Apache version you installed
  • Note, when you switch the Apache version on the WampServer, it will ask you to copy the configuration from the current Apache to the new Apache. In my case, I always choose “NO“.

Remove Addon

If you want to remove the addon that you already installed in WampServer 3, you simply go to the folders that you want to remove. For example, PHP or MySQL or MariaDB or etc, under “/wamp64/bin“. Then remove the addon you want, then restart all services.

For example, if you want to remove MariaDB 10.5.4 addon, you will go to “your drive/wamp64/bin/mariadb/mariadb10.5.4” on your computer and remove the “mariadb10.5.4” folder. Then restart all services to see the changes. Or you can right-click on the WampServer icon and click on the “Refresh” menu.

Wrap Up

Hopefully, the post is helpful and saves your development time like mine. Being a freelancer and developing projects for clients requires me to set up multiple environments. Because it is important to develop the project in the same client’s environment. This way, you will develop and test, and then deploy your changes to production without worrying about breaking the production server from your codebase. Remember, each PHP version and DB version may give a different result. This is how experience has taught me for two decades as a developer.

Useful Links


Your support helps keep this blog running! Secure payments via Paypal and Stripe.


Share this:
Senior WordPress Developer (Freelancer)

Senior WordPress Developer (Freelancer)

I’m a professional WordPress and WooCommerce developer based in Chiang Mai, Thailand, with over a decade of experience creating fast, secure, and scalable websites. From custom themes and plugins to full WooCommerce stores, I help businesses build a strong and reliable online presence. Need a freelance WordPress developer you can count on? View my portfolio or get in touch to discuss your project.