WAMP: before installing a new release
Having very little experience with the WAMP suite (Windows Apache / MySQL / PHP), I was faced with the need to reinstall it both for updating versions of its constituent parts and for installing openssl. Openssl, in turn, is necessary for me to use composer, and composer for installing Laravel 4. I just need Laravel 4 out of curiosity - I want to try the new version of the popular framework. Now you know what led me to translate this article, which I came across in the search for tips from experienced people who have already gone this way, on the forum.wampserver.com forum . The article is fresh, dated October 11, 2013, perhaps it will come in handy for some of you. So…
This process is not one of those where you click the “Next” button several times, then “Finish” and on this you can consider your task completed. There are many traps here that you can fall into. But the result is achievable if you attract a bit of common sense!
Do not start this process if you have only 20 minutes. This may be enough, but, depending on the level of your skill, as well as the number of releases of all 3 pieces of software that you missed, the matter may take a while.
The whole process is based on the fact that the WAMPServer installation basically just copies the files to disk, knowing only which disk the installation is on. Only two Windows services are tied to the installation location folder - 'wampapache' and 'wampmysql'. Therefore, if we delete them, and in wampmanager there is such an option in the menu (Service-> Remove service , - translator's comment ), then we can say that your original installation has been deleted.
First of all, backup all your databases (DB) in Format = SQL format , bearing in mind that your databases are not the ones that come with MySQL. Keep your backups in a safe place and ready to use.
The databases that come with MySQL are 'mysql', 'information_schema' and 'performance_schema', you do not need their backups unless you are sure of the opposite and you know for sure that you need them.
Also, you do not need the 'test' database if you have not used it for something that needs to be saved.
If your databases are small to medium in size, then you can use phpMyAdmin to create backups.
If the database is large and phpMyAdmin could not create a backup (usually this is due to the restriction set in the PHP max_runtime setting ), then the backup can be created using the mysqldump.exe utility. For more information, see dev.mysql.com .
Further, if all your sites connect to their databases using 'localhost', 'root' and '' (empty password), then you do not need to do anything else in this regard. ( WOULD DO IT SO - BAD IDEA ).
If you have set a password for the root user and use ('localhost', 'root' and 'some_you_installed_password'), then you just need to remember this password to set it in the new version of MySQL ( SO DOING IT IS ALSO A BAD IDEA ).
If you do business properly and create a unique MySQL user and password for each database of your sites, then you should write down the user IDs and their passwords in order to restore them in the new version of MySQL.
Or you can use phpMyAdmin to export users as SQL statements, save them and use them in the new version of MySQL.
So, before installing the new version of the WAMP server
In fact, there are only 2 things that WampServer installs - these are the Apache and MySQL services.
Therefore, we will remove these 2 services:
1. Launch WampServer
2. wampmanager -> Stop all Services
3. wampmanager -> MySQL -> Service -> Remove service
4. wampmanager -> Apache -> Service -> Remove service
Now stop the wampmanager by right-clicking click on the wampmanager -> Exit menu.
Rename the wamp folder to something like wamp_old. This is your backup!
Now you can install a new copy of the WAMP server, let 's do it.
Download and install the new WAMP server, the installation can be performed on any drive C, D, E, etc., can be installed in the root directory of the drive, for example C: \ wamp,but do not install the package in the C: \ Program Files \ directory
Check that your installation
works as follows: 1. The wampmanager icon in the system area should be GREEN.
2. Run: wampmanager -> localhost
3. Click on the phpMyAdmin link to make sure it is working.
WampServer 2.4 comes with a different phpmyadmin configuration, so initially, when it starts, the login page loads. Remember that in the new installation, username = root, and the password is EMPTY.
If you still have problems, remember that this new installation does not contain all the changes that you could make in the previous installation. Therefore, right now you can compare your old and new configurations and transfer the necessary settings from the old configuration to the new one.
Remember that you are updating Apache, MySQL and PHP , and the parameters of this whole trinity could change / be deleted or new ones could be added !!!
Therefore, do not just copy them from the old wamp configuration to the new one.
YOU WILL BE PROBLEMS!
(literally it was - dragon appeared, - prim.perevodchika )
That's why we have not removed the old wamp folder, you must first make sure the new installation works correctly.
Here are some files you should definitely pay attention to, but depending on what you have done with Apache / PHP / MySQL, there may be others, and only you can know about it.
Each change in these files should be accompanied by a health check of Apache and MySQL:
\ wamp \ alias \ phpmyadmin.conf,
\ wamp \ alias \ sqlbuddy.conf,
\ wamp \ alias \ webgrind.conf,
If you are using Apache 2.2. x, make sure that security is configured in Apache as follows:
Order Deny, Allow
Deny from all
Allow from 127.0.0.1 localhost :: 1
plus those specific IP addresses that you gave Apache access from your network, for example,
Allow from 192.168.0
will give access to the server to any ip from your internal network.
If you are using Apache 2.4.x, It's
time to read the attached Wampserver 2.4 What to do after Installing post .
Your php.ini is used by Apache
(to access the file, click wampmanager -> PHP -> php.ini), in fact, the file is located in the \ wamp \ bin \ apache \ apachex.yz \ bin \ php.ini folder, but open it for editing using the specified menu.
Your php.ini is used by the PHP CLI
If you really use the PHP CLI (edit the file \ wamp \ bin \ php \ phpx.yz \ php.ini)
Compare your old and new versions of the files, remember that the settings could change, extensions could be added to core php, and therefore not needed as extensions, etc.
And again, remember that a lot could change, some parameters disappear, others add, etc.
For example, if you use the INNODB database, then you need to activate the innodb parameters commented out by default.
You can visit the mysql website, they have a “How to upgrade” page for all versions of this DBMS.
Here is an example - dev.mysql.com .
If you are upgrading to mysql 5.6, you might want to add this parameter in order to reduce the amount of memory allocated for MySQL. About half a gigabyte of memory is allocated by default, this setting will reduce the allocated amount to a more acceptable one. Set this setting according to the capabilities of your system !!!
table_definition_cache = 800
Now you can return to restoring MySQL users and your databases in the new version of MySQL.
If you are updating the VERY OLD version of MySQL, do not forget that the recovery process may not be so simple. You may need to fix a couple of things before the new version of MySQL can accept your old data. This is a fairly rare situation, but it can happen. And again I remind you - do not do the update 10 minutes before you need to show the presentation using the new version of WampServer.
Transferring your websites to a new copy of WAMP
Just copy your \ wamp_old \ www \ * directory to the \ wamp \ www \
directory Transfer virtual directories to a new copy of WAMP
In this case, you can transfer the extras \ https-vhost.conf file from the directory containing the old version of Apache to the directory with the new version of Apache.
Keep in mind that the instructions in this file may need to be fixed according to the rules of the new Apache release.
At a minimum, check the changes to 'Allow from', 'Require', and also remove the comment line 'Include conf / extra / httpd-vhosts.conf' in your new httpd.conf file.
Migrating old versions of Apache, MySQL and PHP from the old version of wamp to the new
Remember that one of the strengths of WAMPServer is the ability to switch between multiple versions of Apache, MySQL and PHP.
Therefore, you can transfer them to the new WampServer installation.
Copy?: \ Wamp-old \ bin \ apache to?: \ Wamp \ bin
Copy?: \ Wamp-old \ bin \ mysql to?: \ Wamp \ bin
Copy?: \ Wamp-old \ bin \ php to?: \ Wamp \ bin
Remember that it’s possible the first time you installed WampServer, which knows nothing about Apache 2.4, and also that NOT ALL PHP versions will work under Apache 2.4.
Mostly because when they were compiled and linked, Apache 2.4 did not exist yet, and the interaction between Apache and PHP was changed in Apache 2.4.
So, in ALL versions of your PHP, in the directory?: \ Wamp \ bin \ php \ phpx.yz \ there is a file called wampserver.conf.
In older PHP releases, it might look something like this:
This file tells wampmanager which libraries are called by the PHP interpreter and which major version of Apache they are compatible with.
This information is used when switching between versions of Apache and PHP using the WampManager menu.
Older versions may not contain such instructions for Apache 2.4, so you have to add them yourself.
Only add such a new section if your PHP version contains the php5apache2_4.dll file in your directory.
If it is absent, and they exist only for versions PHP> 5.3.17 or so, do not add a new section to wampserver.conf.
$phpConf['apache']['2.4']['LoadModuleName'] = 'php5_module'; $phpConf['apache']['2.4']['LoadModuleFile'] = 'php5apache2_4.dll'; $phpConf['apache']['2.4']['AddModule'] = '';
So, if you are using Apache 2.4.x, and your version of PHP does not contain the php5apache2_4.dll file, then you will see a small icon prohibiting entry next to this version, if you go to the WampManager menu and look at the PHP -> Versions section. This is a visual confirmation that you should not have switched to this version of PHP when using the current version of Apache. Of course, you can change your version of Apache to one that is compatible with this version of PHP and the visual indication will change.
But remember that this mechanism is controlled by the wampserver.conf file, which is unique for each version of PHP. You cannot simply add version 2.4 information to each file, but only to those that really come with the php5apache2_4.dll library. And, in anticipation of your question, I’ll assume that I’ll just assume that it may be possible to recompile older versions of PHP in order to achieve compatibility with Apache 2.4, but this may not happen. Old versions of PHP are old for a reason, and you should take them into account only if you need to create your development environment as close as possible to the deployment environment of your code. Or if you are using some very old and possibly poorly written php code. In this case, you can definitely use the old version of Apache.
If everything goes damn wrong , and you have to go back to the previous version.
We can return to the original version of wamp like this:
Run the new WAMPServer and delete the MySQL and Apache services.
wampmanager -> Stop all services
wampmanager -> MySQL -> Service -> Remove service
wampmanager -> Apache -> Service -> Remove service
Now stop the wampmanager.
Right-click wampmanager -> Exit
Rename the current \ wamp folder to, for example, \ wamp_new (or, if you completely gave up, you can just delete it and start from scratch some other time).
Rename the \ wamp_old folder back to \ wamp.
We start wampmanager, the icon on your table should work as before, install the MySQL and Apache services.
wampmanager -> MySQL -> Service -> Install service
wampmanager -> Apache -> Service -> Install service
You must return to the starting point of the start of the upgrade process.
Remember to clear your browser’s cache (CTRL + F5) so that you don’t encounter any oddities that happen when switching between installations.
PS Habr for some reason does not consider this a link, therefore I give a link to the original at the end of the article.
PSS Article markup is as close as possible to the original.