» » » Upgrade WampServer and Install Addons

Upgrade WampServer and Install Addons

posted in: Web development | 0
Follow by Email
Facebook
3 min read

Recently I am working on the WordPress site from a new customer. The client’s server is using PHP5.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 the PHP 5.5.38 in 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 version for WampServer, I need to upgrade my WampServer to the newest version first.

 

Here are my steps

  • Update WampServer
  • Install PHP version I want

 

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 download 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 write some change in 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 installing, it will ask for the WampServer folder. You need to check and confirm the downloaded file is installing in the current WampServer folder. In my case, my current WampServer is “d:\wamp64” folder.
    • After install, 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 then you will see the WampServer icon shows up at the taskbar.
    • Test by visiting the test sites(http://locahost/example) on your WampServer to see everything is still working as normal. Also, you should test the test sites that you set as Virtual host(http://example.com).

 

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

 

Install PHP version I want

  • At the WampServer Versions, look for Addons WampServer 3 section.
  • Find the PHP section and choose which PHP version you want to install into WampServer 3. In my case, I download 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 administrator
  • Install the downloaded PHP version you want into “D:\wamp64\bin\php” which is the PHP folder in Wampserver
  • After install, 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 then you will see the WampServer icon shows up at the taskbar.
  • Test by visiting the test sites(http://locahost/example) on your WampServer to see everything is still working as normal. Also, you should test the test sites that you set as 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 update). Then you can install the addons just like I show you the steps above.

For MySQL, after installing the MySQL into Wampserver bin(D:\wamp64\bin\mysql) in 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 because 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 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 specific database via mysqldump command:

mysqldump -u YourUser -p YourDatabaseName > wantedsqlfile.sql

Import your export database SQL file via mysqldump command:

mysql -u username -p database_name < file.sql

 

And that’s it. Your developing will be flow and not waste time to develop twice or break the production server.

 

Happy developing day!

Follow by Email
Facebook