Перейти к содержимому

Как обновить php на xampp

  • автор:

Миграция с PHP 8.1.x на PHP 8.2.x

Эта новая минорная версия приносит ряд новых возможностей и несовместимостей, которые требуется протестировать перед переключением версий PHP в производственных средах.

Смотрите также руководство по миграции для версий PHP 7.1.x, 7.2.x, 7.3.x, 7.4.x, 8.0.x, 8.1.x.

Improve This Page

User Contributed Notes

There are no user contributed notes for this page.

  • Приложения
    • История PHP и смежных проектов
    • Миграция с PHP 8.2.x на PHP 8.3.x
    • Миграция с PHP 8.1.x на PHP 8.2.x
    • Миграция с PHP 8.0.x на PHP 8.1.x
    • Миграция с PHP 7.4.x на PHP 8.0.x
    • Миграция с PHP 7.3.x на PHP 7.4.x
    • Миграция с PHP 7.2.x на PHP 7.3.x
    • Миграция с PHP 7.1.x на PHP 7.2.x
    • Миграция с PHP 7.0.x на PHP 7.1.x
    • Миграция с PHP 5.6.x на PHP 7.0.x
    • Миграция с PHP 5.5.x на PHP 5.6.x
    • Отладка в PHP
    • Опции конфигурации
    • Директивы php.ini
    • Список и классификация модулей
    • Список псевдонимов функций
    • Список зарезервированных слов
    • Список типов ресурсов
    • Список доступных фильтров
    • Список поддерживаемых транспортных протоколов
    • Таблицы сравнения типов PHP
    • Список меток (tokens) парсера
    • Руководство по именованию
    • Об этом руководстве
    • Creative Commons Attribution 3.0
    • Алфавитный список
    • Список изменений
    • Copyright © 2001-2024 The PHP Group
    • My PHP.net
    • Contact
    • Other PHP.net sites
    • Privacy policy

    Upgrading PHP in XAMPP for Windows?

    I would like to know how you upgrade PHP in Xampp for Windows? I tried to download the latest PHP version from the main PHP site but when I check (phpinfo) I still get that the previous version is still in use.

    6,072 10 10 gold badges 44 44 silver badges 121 121 bronze badges
    asked Jan 28, 2010 at 13:25
    Stanley Ngumo Stanley Ngumo
    4,209 8 8 gold badges 46 46 silver badges 65 65 bronze badges
    Follow this post. It works to me.
    Commented Sep 6, 2016 at 4:56

    19 Answers 19

    Take a backup of your htdocs and data folder (subfolder of MySQL folder), reinstall upgraded version and replace those folders.

    Note: In case you have changed config files like PHP (php.ini), Apache (httpd.conf) or any other, please take back up of those files as well and replace them with newly installed version.

    answered Jan 28, 2010 at 13:39
    1,997 1 1 gold badge 15 15 silver badges 20 20 bronze badges

    I renamed my current XAMPP at C:\XAMPP to C:\XAMPP ORIG so that I could install the newest version of XAMPP at C:\XAMPP but still have my app’s data and original version in case something went. I was scared after I installed the newest XAMPP and saw that it «overwrote» my XAMPP ORIG — on my C: drive, there was only C:\XAMPP — but relieved when my htdocs and mysql\data was in the new, updated version of XAMPP.

    Commented Dec 11, 2012 at 17:31

    I always used to do like this, but some databases in the backup data folder crashed when they are placed in the newly installed xampp folder. So, I’m always searching to upgrade PHP without apache upgrade.

    Commented Jan 13, 2014 at 15:58

    @whitelettersandblankspaces are you a xampp user? I thought it was perfectly clear for anyone who uses xampp. Still, my upvote goes to Dharmang, he answered earlier and with more precision, what if I want to stick with the same versions of Apache and MySql and just update PHP? This lazy (but clear) answer doesn’t cover that

    Commented Jul 25, 2014 at 14:46

    Beware that this answer only describes saving the web and MySQL data. It does not include configuration changes to PHP (php.ini) Apache (httpd.conf and others) etc.

    Commented Jul 31, 2015 at 13:03
    This is upgrading Xampp, not upgrading PHP with the same Xampp.
    Commented Jan 25, 2016 at 15:16

    Simplest method to upgrade PHP in XAMPP :

    1. Download latest portable version of XAMPP .
    2. Extract the archive(not where XAMPP already installed).
    3. Copy the PHP folder from the extracted archive.
    4. Keep back up of PHP folder which is in installed XAMPP directory. You can backup it like changing the PHP folder name to PHP-old or like PHP-version-number
    5. Paste the PHP folder which you copied from the extracted archive.
    6. Replace the php.ini file with your backup folder php.ini file in case you have changed the default settings earlier.
    7. That’s all, start/restart the server .

    answered Oct 21, 2014 at 9:32
    Vikas Khunteta Vikas Khunteta
    1,454 1 1 gold badge 15 15 silver badges 15 15 bronze badges
    @dlofrodloh Here you can find all XAMPP sourceforge.net/projects/xampp/files files.
    Commented Dec 7, 2016 at 17:15

    Update in 2018: I tried updating 7.0.27 to 7.2.7 and worked like charm. The biggest advantage over reinstalling whole xampp is keeping all the settings up (except for that php.ini). Thanks for that

    Commented Jul 22, 2018 at 8:51

    @VikasKhunteta i know this is purely about upgrading PHP but in real world you often need to take DB into consideration too and it might be a rude awakening seeing your stuff not working anymore. I tried a couple of solution, non worked for me so far, so i moved away from complete environments like XAMPP.

    Commented Aug 28, 2018 at 8:03

    @AdheneManx I had the same issue and your PHPMyAdmin suggestion worked great. I also want to point out that I have my PHP version installed as x86, therefore the x64 versions won’t work. It is needed to download the correct portable version of Xampp x86 sourceforge.net/projects/xampp/files/XAMPP%20Windows/7.3.2 — You can check if you have x86 or x64 installed with phpinfo()

    Commented Apr 30, 2020 at 20:51

    Thumbs up! Still works while updating to php 7.4 but you also need to do the exact same process for phpMyAdmin also because after upgrading it works but lots of deprecation notices come.

    Commented Oct 23, 2020 at 17:49

    You can go through the following link as it helped me, should work for you as well. http://hype-free.blogspot.com/2007/07/updating-php-in-xampp-for-windows.html

    Realizing that my answer helped couple of users, here is the edit from original link:

    First of all Always backup your data.

    1. Download the latest binary version of PHP (make sure to get the .zip package not the installer)
    2. De-archive it to a directory
    3. Overwrite the contents of directory in the php subfolder of your XAMPP installation directory.
    4. Overwrite the contents of the directory apache\bin with the newer versions.
    5. Now the trick: take the files which have a ‘_2’ in their names (for example php5apache2_2.dll or php5apache2_2_filter.dll), copy them in the apache\bin subdirectory and remove the ‘_2’ part, overwriting the existing files. This is necessary because by XAMPP uses Apache version 2.2 and the files with the 2 prefix are built for Apache 2.0, so you must take the files build for the newer version (which has a different plugin interface) and rename them in the filenames XAMPP expects.

    NOTE: there are two directories to be updated with new version of files, namely php sub-directory and apache/bin sub-directory, inside XAMPP installation.

    1 1 1 silver badge
    answered Jan 25, 2011 at 10:37
    3,018 36 36 silver badges 40 40 bronze badges

    Step 4 is not needed. After doing the rest I also copied the php.ini and php/extras from the backup folder. (It was also mentioned in the comments of the article, that helped me too)

    Commented Aug 15, 2014 at 8:21

    @Dharmang: unfortunately i did shift+delete my all the xampp,php apache folder. For trying to install latest version of php. Now i confused, how to start. can you help me please?

    Commented Jun 25, 2015 at 9:59

    Now install the latest version, but your data (like www directory) is destroyed now, you can try some recovery software.

    Commented Jun 26, 2015 at 5:10

    @Dharmang, thanks for your post. Can you tell me where are the files you mentioned in STEP 5, and also when do I need to replace them before overwriting the content or after(as mentioned in STEP 3,4)

    Commented Feb 1, 2016 at 6:46
    You need to download the version of PHP you are interested from xampp site.
    Commented Feb 1, 2016 at 11:34

    I have upgraded to php7.2 from php5.6

    Steps which I followed.

    1. Download PHP binary from here. I have downloaded VC15 x86 Thread Safe Zip file.
    2. Created a backup of xampp/php folder.
    3. Extract all the contents of zip file to xampp/php folder.
    4. Copied php.ini (as I have modified it before and I want my configuration back, if you were using default one then skip this step.)
    5. Edit below file

    LoadFile «C:/xampp/php/php5ts.dll»

    LoadFile «C:/xampp/php/libpq.dll»

    LoadModule php5_module «C:/xampp/php/php5apache2_4.dll»

    LoadFile «C:/xampp/php/php7ts.dll»

    LoadFile «C:/xampp/php/libpq.dll»

    LoadModule php7_module «C:/xampp/php/php7apache2_4.dll»

    1. Restart Apache

    2,577 1 1 gold badge 21 21 silver badges 16 16 bronze badges
    answered Dec 28, 2017 at 9:37
    Anurag Prashant Anurag Prashant
    1,014 11 11 silver badges 31 31 bronze badges

    Not the perfect solution: PHP Warning: PHP Startup: Unable to load dynamic library ‘php_mysql.dll’ (tried: C:\xampp\php\ext\php_mysql.dll .

    Commented Jan 26, 2018 at 13:20
    Try to download exact build. in my case it was VC15 x86 Thread Safe
    Commented Mar 15, 2018 at 9:39

    @Harry — Please modify it to php7_mysql.dll (or whatever applicable). The question was to upgrade php module not other libraries.

    Commented May 31, 2018 at 7:30

    I needed to update my php from 5.3.8 to 5.3.29. (both Thread Safe) on Windows

    1. Back-up my initial php folder, under xampp.
    2. Downloaded zip from here http://windows.php.net/download/#php-5.3-ts-VC9-x86
    3. Unpack that zip into xampp folder.
    4. Copied php.ini file from old php folder into new one.
    5. Copied a couple of folders that I didn’t have in the new php folder, from old one. For example: extras, which contained browscap.ini file (this one is needed)
    6. Copied needed extensions, from old php ext folder into new php ext folder. I copied them manually, by checking list of extensions from php.ini file.
    7. Copied also these files: php5apache2_2.dll, php5ts.dll

    Hope that I covered everything.

    Most probably these steps will not work if you change major versions of php, e.g. 5.3.x to 5.4.x, but for minor versions, it should work.

    Also, a good way to see what’s wrong. start command line and try to start httpd.exe, under xampp/apache/bin from there, it will list errors found.

    answered Jan 16, 2015 at 10:51
    1,344 12 12 silver badges 9 9 bronze badges
    Didn’t work for going to php7, but from 5.5 to 5.6 worked well!
    Commented Sep 29, 2016 at 22:36

    I think you need to actually download and install XAMPP with the desired PHP version. I dont think you can just upgrade the components of XAMPP individually unless there is a facility provided for this within XAMPP itself.

    answered Jan 28, 2010 at 13:33
    prodigitalson prodigitalson
    60.3k 10 10 gold badges 102 102 silver badges 114 114 bronze badges
    XAMPP does not have the current PHP version, so a fresh install would be useless
    Commented Aug 6, 2014 at 18:50
    You can upgrade the components of XAMPP, check my answer at here
    Commented Jun 12, 2015 at 6:27

    download your desired version of php binary from http://windows.php.net/download/ website. download Thread Safe binary zip version. Unzip the downloaded version of the PHP in a separate folder. Please make sure that your new php folder name is not «PHP». May be you can use filder name as the version name. For example for php 5.4 you can use php54.

    Copy the new php folder into your xampp folder. Now go to yourxampp/apache/conf/extra folder. Open file httpd-xampp.conf from the folder extra. Change the following variables:

    Variable PHPINIDir to be / Varaible LoadModule to be //php5apache2_2.dl

    Save the file httpd-xampp.conf. Restart your XAMPP apache server. If your server get restarted successfully then your server php version is upgraded.

    answered May 20, 2013 at 11:04
    161 1 1 gold badge 3 3 silver badges 8 8 bronze badges

    I don’t have enough reputation to comment yet, but, to add to ssharma’s answer:

    After you copy your htdocs folder to a safe place, just export your databases from PHPmyadmin. Simply go to each of your databases and click on the export tab at the top. Export them as sql (or whatever, really — just remember what you chose). Upgrade your XAMPP installation. Now, in the new version of XAMPP, create the databases that you want to re-insert. Example: you have a database named ‘test’ that you exported from your old installation, name the new, empty database the same thing. Now, go into ‘test’ and hit the import button along the top (right next to the export button). Click on choose file, find the sql file that you exported earlier (should be ‘test.sql’) and import. Your tables and data will be in place.

    NOTE: There’s an option to export the entire collection of databases (it names the file 127.0.0.1.sql). But, I’ve never had much luck getting it to import correctly. Do each of your databases separately to ensure it works. I made this post kind of long-winded, but that’s because I like to write for the people that don’t know exactly what they’re doing yet (I, myself, was there not too long ago (all of us were at some point)).

    Shorthand version of my answer:
    1) Export your databases individually
    2) Import into your new installation of XAMPP

    answered Jan 16, 2014 at 15:23
    ElmosHomie492 ElmosHomie492
    94 1 1 silver badge 3 3 bronze badges

    1. Go to phpinfo() , press ctrl + f , and type thread to check the value.
    2. If it is enabled download the non thread safe version, otherwise download the thread safe version from here (zip).
    3. Extract it, and rename the folder to php .
    4. Go to your xampp folder rename the default php folder to something else.
    5. Copy the extracted (renamed php ) folder in xampp directory.
    6. Copy the php.ini file from default/old php folder (That you renamed) and paste it into the new php folder.
    7. Restart xampp server and you’re good to go.

    22.8k 7 7 gold badges 65 65 silver badges 96 96 bronze badges
    answered Jul 25, 2016 at 20:35
    Muhammad Younus Muhammad Younus
    1,895 20 20 silver badges 20 20 bronze badges

    There are newer beta versions of Xampp that come with newer PHP upgrades.

    406 1 1 gold badge 4 4 silver badges 15 15 bronze badges
    answered Aug 7, 2010 at 19:41
    51 1 1 silver badge 1 1 bronze badge

    Uploaded it to the xampp directory by renaming the previous PHP folder to something else. But, then got the following error while starting the apache.

    Error: Apache shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method. Press the Logs button to view error logs and check the Windows Event Viewer for more clues If you need more help, copy and post this entire log window on the forums 

    After that, I’ve replaced the apache directory as well from the xampp folder with a newer version which I’ve downloaded, it sorted the issue out.

    Got another problem while trying to access the phpmyadmin page, then again renamed the previous phpmyadmin folder from the xampp directory and uploaded the new version from the downloaded files. It’s fixed the issue.

    answered Jun 1, 2021 at 6:27
    Showhan Ahmed Showhan Ahmed
    109 2 2 silver badges 9 9 bronze badges

    In this site you can get

    by using this add on you can upgrade the latest versions.

    219k 99 99 gold badges 461 461 silver badges 501 501 bronze badges
    answered Nov 17, 2011 at 9:40
    31 1 1 bronze badge

    All the zipped folders/installation executable files I download from this link is either empty or corrupted! Please help?

    Commented Sep 16, 2013 at 8:47

    I just upgrade my old XAMPP portable with PHP 5.3.X(Include Mercury & FileZilla & Tomcat) to XAMPP portable with PHP 5.6.X ( Include previous versions ) .
    My way:

    1. First download last xampp portable(my using version: xampp-portable-win32-5.6.14-3-VC11Direct Download Link) Last XAMPP
    2. Extract new download file to drive d , because new version dont have mercury,filezilla,tomcat in it , then i copy these packages from my old version to new one
    3. Now on old xampp first copy all htdocs files to new xampp htdocs
    4. Now on old xampp backup all of database in 5 two 10 separated sql files
    5. Now on new xampp going and change some settings like max_upload_size and etc on php.ini and also in /apache/conf/extra/httpd-xampp.conf
    6. Now delete ( make a rar archive and delete ) it , and copy new xampp from drive D to drive C
    7. Now start new xampp , going to phpmyadmin , create a user and password that i use in previous xampp and add all privileges that user.
    8. Now going to import tab on phpmyadmin and separately import sql files.
    9. Now i test xampp with all new features in drive C

    NOTE
    On Export database tab on phpmyadmin, select UTF-8 Character and check Disable foreign key checks checkbox
    and on import tab uncheck Enable foreign key checks .

    answered Nov 20, 2015 at 8:20
    893 1 1 gold badge 13 13 silver badges 24 24 bronze badges

    1) Backup your htdocs folder
    2) export your databases (follow this tutorial)
    3) uninstall xampp
    4) install the new version of xampp
    5) replace the htdocs folder that you have backed up
    6) Import your databases you had exported before

    Note: In case you have changed config files like PHP (php.ini), Apache (httpd.conf) or any other, please take back up of those files as well and replace them with newly installed version.

    answered Jun 28, 2016 at 16:42
    csandreas1 csandreas1
    2,170 1 1 gold badge 31 31 silver badges 53 53 bronze badges

    To update with latest PHP version in xampp without losing your htdocs data you need to download the zip file of your desired version of PHP from sourceforge.net, then copy the PHP folder from the extracted file and paste it into your xampp folder.

    NOTE: Don’t forget to rename the old PHP file folder which already exists.

    Then simply edit your php.ini file with the current path to reach the right PHP folder

    After that, you need to re-run your xampp.

    I found a video on youtube which can help you. how to update php version in xampp

    answered Jun 10, 2018 at 21:01
    239 5 5 silver badges 16 16 bronze badges

    1) Download new PHP from the official site (better some zip). Old php directory rename to php_old and create again php directory and put there unzipped files.

    In php.ini connect needed modules if you used something that was turned off by default (like Memcached etc.), but doesn’t forget to add corresponding .dll files.

    2) In my case, I had to update Apache. So repeat the same steps: download the new package, rename directories, create new apache directory and put their new files.

    Now you can try to restart apache running apache_start.bat from xampp folder (better run this bat, than restart apache service from Windows services window, cause in this case in console you’ll see all errors if there will be some, including lines in config where you’ll have problem). If you updated Apache and run this file, in the list of services you’ll see Apache2.2, but in description you can get another version (in my case that was Apache/2.4.7).

    In case of Apache update you can get some problems, so mind:

    • after you replace the whole directory, you may need to configure you apache/conf/httpd.conf file (copy virtual hosts from old config, set up DocumentRoots, permissions for directories, all paths, extend the list of index files (by default apache has only index.html so other index files will be just ignored and Apache will just list the site root directory in browser), configure you logs etc.)
    • connect modules you need (if you used something that was not turned on by default like mod_rewrite etc.)

    1,106 1 1 gold badge 18 18 silver badges 29 29 bronze badges
    answered Jul 28, 2014 at 13:59
    5,015 8 8 gold badges 39 39 silver badges 56 56 bronze badges

    The ultimate guide to upgrading XAMPP and PHP

    Note that it’s not recommended to just swap out an older version of PHP in XAMPP to a newer version, as there’s the possibility it could introduce problems and incompatibilities due to tools, configurations and codebases that weren’t designed to play together.

    Instead, it’s a much safer idea to update the PHP version with the rest of XAMPP — this will upgrade both PHP and any other binaries that PHP needs to work with, including MySQL and PHPMyAdmin, to versions that are designed to be compatible with it. This way you will also be able to take advantage of the security and speed advantages of updating to newer versions — for example, modern versions of PHPMyAdmin are miles faster and much less buggy than versions that are a few years old.

    Unfortunately there is no easy way to update XAMPP, which is bizarre considering how old and mature it is as a project, but the good news is it can be easily accomplished using the steps below.

    How to properly update XAMPP and PHP 8.x

    1. Rename your current, working XAMPP folder (located at C:\xampp by default) to XAMPP.old or something similar to indicate it’s the old version.
    2. Download the XAMPP installer for the version of XAMPP/PHP you want (the XAMPP version mirrors the PHP version to make it easier to know which PHP version you’re getting), and install it to C:\xampp .
    3. Go through the install process and feel free to deselect any software you don’t need — like Mercury Mail and Tomcat — to prevent them cluttering up your installation, then wait for the install to complete.
    4. Delete the following folders from C:\xampp and copy and paste their equivalents from C:\xampp.old :
    htdocs mysql\data mysql\backup 

    You’ve now moved all of your website and database data over from your last installation, so if you didn’t customise your XAMPP configuration a lot or don’t care about moving your configuration over, you can stop at this stage and you will have a fully-working installation of XAMPP running on your new version of PHP, along with new software that is compatible with it.

    Next, you need to copy over the configuration files from your old XAMPP installation at C:\xampp.old to the new one at C:\xampp .

    First is the php\php.ini file — this file should not simply be copied over, as it contains configuration options that are very specific to the current PHP installation. If you’ve made changes to it or you’re not sure whether you have, you can use a diff tool like diff —color -y to compare your old php.ini file with the one you just installed — if you see any lines in red, these are the lines you might need to copy over to your new C:\xampp\php.ini file, although note that even many of these might be unnecessary — usually they are removed by the developers because they’re no longer needed by the newer PHP version.

    The remaining configuration files and folders can simply be copied below into the same locations on C:\xampp , replacing the newer versions:

    apache\conf\httpd.conf apache\conf\ssl.crt apache\conf\ssl.csr apache\conf\ssl.key phpmyadmin\config.inc.php apache\conf\extra\httpd-vhosts.conf 

    All of these changes should be pretty safe but it’s always a good idea to keep the C:\xampp.old folder around for a few weeks while you’re testing out your new XAMPP server. If it turns out you missed something you can then just copy it over later.

    You should now be able to open the XAMPP Control Panel to start the server and confirm that your new versions of Apache and MySQL are working, and visit localhost/phpmyadmin to confirm that the latest version of PHPMyAdmin has been installed successfully. Finally, run php -v to confirm that you’re on the installed version of PHP.

    Upgrading PHP in XAMPP for Windows?

    I would like to know how you upgrade PHP in Xampp for Windows? I tried to download the latest PHP version from the main PHP site but when I check (phpinfo) I still get that the previous version is still in use.

    6,072 10 10 gold badges 44 44 silver badges 121 121 bronze badges
    asked Jan 28, 2010 at 13:25
    Stanley Ngumo Stanley Ngumo
    4,209 8 8 gold badges 46 46 silver badges 65 65 bronze badges
    Follow this post. It works to me.
    Commented Sep 6, 2016 at 4:56

    19 Answers 19

    Take a backup of your htdocs and data folder (subfolder of MySQL folder), reinstall upgraded version and replace those folders.

    Note: In case you have changed config files like PHP (php.ini), Apache (httpd.conf) or any other, please take back up of those files as well and replace them with newly installed version.

    answered Jan 28, 2010 at 13:39
    1,997 1 1 gold badge 15 15 silver badges 20 20 bronze badges

    I renamed my current XAMPP at C:\XAMPP to C:\XAMPP ORIG so that I could install the newest version of XAMPP at C:\XAMPP but still have my app’s data and original version in case something went. I was scared after I installed the newest XAMPP and saw that it «overwrote» my XAMPP ORIG — on my C: drive, there was only C:\XAMPP — but relieved when my htdocs and mysql\data was in the new, updated version of XAMPP.

    Commented Dec 11, 2012 at 17:31

    I always used to do like this, but some databases in the backup data folder crashed when they are placed in the newly installed xampp folder. So, I’m always searching to upgrade PHP without apache upgrade.

    Commented Jan 13, 2014 at 15:58

    @whitelettersandblankspaces are you a xampp user? I thought it was perfectly clear for anyone who uses xampp. Still, my upvote goes to Dharmang, he answered earlier and with more precision, what if I want to stick with the same versions of Apache and MySql and just update PHP? This lazy (but clear) answer doesn’t cover that

    Commented Jul 25, 2014 at 14:46

    Beware that this answer only describes saving the web and MySQL data. It does not include configuration changes to PHP (php.ini) Apache (httpd.conf and others) etc.

    Commented Jul 31, 2015 at 13:03
    This is upgrading Xampp, not upgrading PHP with the same Xampp.
    Commented Jan 25, 2016 at 15:16

    Simplest method to upgrade PHP in XAMPP :

    1. Download latest portable version of XAMPP .
    2. Extract the archive(not where XAMPP already installed).
    3. Copy the PHP folder from the extracted archive.
    4. Keep back up of PHP folder which is in installed XAMPP directory. You can backup it like changing the PHP folder name to PHP-old or like PHP-version-number
    5. Paste the PHP folder which you copied from the extracted archive.
    6. Replace the php.ini file with your backup folder php.ini file in case you have changed the default settings earlier.
    7. That’s all, start/restart the server .

    answered Oct 21, 2014 at 9:32
    Vikas Khunteta Vikas Khunteta
    1,454 1 1 gold badge 15 15 silver badges 15 15 bronze badges
    @dlofrodloh Here you can find all XAMPP sourceforge.net/projects/xampp/files files.
    Commented Dec 7, 2016 at 17:15

    Update in 2018: I tried updating 7.0.27 to 7.2.7 and worked like charm. The biggest advantage over reinstalling whole xampp is keeping all the settings up (except for that php.ini). Thanks for that

    Commented Jul 22, 2018 at 8:51

    @VikasKhunteta i know this is purely about upgrading PHP but in real world you often need to take DB into consideration too and it might be a rude awakening seeing your stuff not working anymore. I tried a couple of solution, non worked for me so far, so i moved away from complete environments like XAMPP.

    Commented Aug 28, 2018 at 8:03

    @AdheneManx I had the same issue and your PHPMyAdmin suggestion worked great. I also want to point out that I have my PHP version installed as x86, therefore the x64 versions won’t work. It is needed to download the correct portable version of Xampp x86 sourceforge.net/projects/xampp/files/XAMPP%20Windows/7.3.2 — You can check if you have x86 or x64 installed with phpinfo()

    Commented Apr 30, 2020 at 20:51

    Thumbs up! Still works while updating to php 7.4 but you also need to do the exact same process for phpMyAdmin also because after upgrading it works but lots of deprecation notices come.

    Commented Oct 23, 2020 at 17:49

    You can go through the following link as it helped me, should work for you as well. http://hype-free.blogspot.com/2007/07/updating-php-in-xampp-for-windows.html

    Realizing that my answer helped couple of users, here is the edit from original link:

    First of all Always backup your data.

    1. Download the latest binary version of PHP (make sure to get the .zip package not the installer)
    2. De-archive it to a directory
    3. Overwrite the contents of directory in the php subfolder of your XAMPP installation directory.
    4. Overwrite the contents of the directory apache\bin with the newer versions.
    5. Now the trick: take the files which have a ‘_2’ in their names (for example php5apache2_2.dll or php5apache2_2_filter.dll), copy them in the apache\bin subdirectory and remove the ‘_2’ part, overwriting the existing files. This is necessary because by XAMPP uses Apache version 2.2 and the files with the 2 prefix are built for Apache 2.0, so you must take the files build for the newer version (which has a different plugin interface) and rename them in the filenames XAMPP expects.

    NOTE: there are two directories to be updated with new version of files, namely php sub-directory and apache/bin sub-directory, inside XAMPP installation.

    1 1 1 silver badge
    answered Jan 25, 2011 at 10:37
    3,018 36 36 silver badges 40 40 bronze badges

    Step 4 is not needed. After doing the rest I also copied the php.ini and php/extras from the backup folder. (It was also mentioned in the comments of the article, that helped me too)

    Commented Aug 15, 2014 at 8:21

    @Dharmang: unfortunately i did shift+delete my all the xampp,php apache folder. For trying to install latest version of php. Now i confused, how to start. can you help me please?

    Commented Jun 25, 2015 at 9:59

    Now install the latest version, but your data (like www directory) is destroyed now, you can try some recovery software.

    Commented Jun 26, 2015 at 5:10

    @Dharmang, thanks for your post. Can you tell me where are the files you mentioned in STEP 5, and also when do I need to replace them before overwriting the content or after(as mentioned in STEP 3,4)

    Commented Feb 1, 2016 at 6:46
    You need to download the version of PHP you are interested from xampp site.
    Commented Feb 1, 2016 at 11:34

    I have upgraded to php7.2 from php5.6

    Steps which I followed.

    1. Download PHP binary from here. I have downloaded VC15 x86 Thread Safe Zip file.
    2. Created a backup of xampp/php folder.
    3. Extract all the contents of zip file to xampp/php folder.
    4. Copied php.ini (as I have modified it before and I want my configuration back, if you were using default one then skip this step.)
    5. Edit below file

    LoadFile «C:/xampp/php/php5ts.dll»

    LoadFile «C:/xampp/php/libpq.dll»

    LoadModule php5_module «C:/xampp/php/php5apache2_4.dll»

    LoadFile «C:/xampp/php/php7ts.dll»

    LoadFile «C:/xampp/php/libpq.dll»

    LoadModule php7_module «C:/xampp/php/php7apache2_4.dll»

    1. Restart Apache

    2,577 1 1 gold badge 21 21 silver badges 16 16 bronze badges
    answered Dec 28, 2017 at 9:37
    Anurag Prashant Anurag Prashant
    1,014 11 11 silver badges 31 31 bronze badges

    Not the perfect solution: PHP Warning: PHP Startup: Unable to load dynamic library ‘php_mysql.dll’ (tried: C:\xampp\php\ext\php_mysql.dll .

    Commented Jan 26, 2018 at 13:20
    Try to download exact build. in my case it was VC15 x86 Thread Safe
    Commented Mar 15, 2018 at 9:39

    @Harry — Please modify it to php7_mysql.dll (or whatever applicable). The question was to upgrade php module not other libraries.

    Commented May 31, 2018 at 7:30

    I needed to update my php from 5.3.8 to 5.3.29. (both Thread Safe) on Windows

    1. Back-up my initial php folder, under xampp.
    2. Downloaded zip from here http://windows.php.net/download/#php-5.3-ts-VC9-x86
    3. Unpack that zip into xampp folder.
    4. Copied php.ini file from old php folder into new one.
    5. Copied a couple of folders that I didn’t have in the new php folder, from old one. For example: extras, which contained browscap.ini file (this one is needed)
    6. Copied needed extensions, from old php ext folder into new php ext folder. I copied them manually, by checking list of extensions from php.ini file.
    7. Copied also these files: php5apache2_2.dll, php5ts.dll

    Hope that I covered everything.

    Most probably these steps will not work if you change major versions of php, e.g. 5.3.x to 5.4.x, but for minor versions, it should work.

    Also, a good way to see what’s wrong. start command line and try to start httpd.exe, under xampp/apache/bin from there, it will list errors found.

    answered Jan 16, 2015 at 10:51
    1,344 12 12 silver badges 9 9 bronze badges
    Didn’t work for going to php7, but from 5.5 to 5.6 worked well!
    Commented Sep 29, 2016 at 22:36

    I think you need to actually download and install XAMPP with the desired PHP version. I dont think you can just upgrade the components of XAMPP individually unless there is a facility provided for this within XAMPP itself.

    answered Jan 28, 2010 at 13:33
    prodigitalson prodigitalson
    60.3k 10 10 gold badges 102 102 silver badges 114 114 bronze badges
    XAMPP does not have the current PHP version, so a fresh install would be useless
    Commented Aug 6, 2014 at 18:50
    You can upgrade the components of XAMPP, check my answer at here
    Commented Jun 12, 2015 at 6:27

    download your desired version of php binary from http://windows.php.net/download/ website. download Thread Safe binary zip version. Unzip the downloaded version of the PHP in a separate folder. Please make sure that your new php folder name is not «PHP». May be you can use filder name as the version name. For example for php 5.4 you can use php54.

    Copy the new php folder into your xampp folder. Now go to yourxampp/apache/conf/extra folder. Open file httpd-xampp.conf from the folder extra. Change the following variables:

    Variable PHPINIDir to be / Varaible LoadModule to be //php5apache2_2.dl

    Save the file httpd-xampp.conf. Restart your XAMPP apache server. If your server get restarted successfully then your server php version is upgraded.

    answered May 20, 2013 at 11:04
    161 1 1 gold badge 3 3 silver badges 8 8 bronze badges

    I don’t have enough reputation to comment yet, but, to add to ssharma’s answer:

    After you copy your htdocs folder to a safe place, just export your databases from PHPmyadmin. Simply go to each of your databases and click on the export tab at the top. Export them as sql (or whatever, really — just remember what you chose). Upgrade your XAMPP installation. Now, in the new version of XAMPP, create the databases that you want to re-insert. Example: you have a database named ‘test’ that you exported from your old installation, name the new, empty database the same thing. Now, go into ‘test’ and hit the import button along the top (right next to the export button). Click on choose file, find the sql file that you exported earlier (should be ‘test.sql’) and import. Your tables and data will be in place.

    NOTE: There’s an option to export the entire collection of databases (it names the file 127.0.0.1.sql). But, I’ve never had much luck getting it to import correctly. Do each of your databases separately to ensure it works. I made this post kind of long-winded, but that’s because I like to write for the people that don’t know exactly what they’re doing yet (I, myself, was there not too long ago (all of us were at some point)).

    Shorthand version of my answer:
    1) Export your databases individually
    2) Import into your new installation of XAMPP

    answered Jan 16, 2014 at 15:23
    ElmosHomie492 ElmosHomie492
    94 1 1 silver badge 3 3 bronze badges

    1. Go to phpinfo() , press ctrl + f , and type thread to check the value.
    2. If it is enabled download the non thread safe version, otherwise download the thread safe version from here (zip).
    3. Extract it, and rename the folder to php .
    4. Go to your xampp folder rename the default php folder to something else.
    5. Copy the extracted (renamed php ) folder in xampp directory.
    6. Copy the php.ini file from default/old php folder (That you renamed) and paste it into the new php folder.
    7. Restart xampp server and you’re good to go.

    22.8k 7 7 gold badges 65 65 silver badges 96 96 bronze badges
    answered Jul 25, 2016 at 20:35
    Muhammad Younus Muhammad Younus
    1,895 20 20 silver badges 20 20 bronze badges

    There are newer beta versions of Xampp that come with newer PHP upgrades.

    406 1 1 gold badge 4 4 silver badges 15 15 bronze badges
    answered Aug 7, 2010 at 19:41
    51 1 1 silver badge 1 1 bronze badge

    Uploaded it to the xampp directory by renaming the previous PHP folder to something else. But, then got the following error while starting the apache.

    Error: Apache shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method. Press the Logs button to view error logs and check the Windows Event Viewer for more clues If you need more help, copy and post this entire log window on the forums 

    After that, I’ve replaced the apache directory as well from the xampp folder with a newer version which I’ve downloaded, it sorted the issue out.

    Got another problem while trying to access the phpmyadmin page, then again renamed the previous phpmyadmin folder from the xampp directory and uploaded the new version from the downloaded files. It’s fixed the issue.

    answered Jun 1, 2021 at 6:27
    Showhan Ahmed Showhan Ahmed
    109 2 2 silver badges 9 9 bronze badges

    In this site you can get

    by using this add on you can upgrade the latest versions.

    219k 99 99 gold badges 461 461 silver badges 501 501 bronze badges
    answered Nov 17, 2011 at 9:40
    31 1 1 bronze badge

    All the zipped folders/installation executable files I download from this link is either empty or corrupted! Please help?

    Commented Sep 16, 2013 at 8:47

    I just upgrade my old XAMPP portable with PHP 5.3.X(Include Mercury & FileZilla & Tomcat) to XAMPP portable with PHP 5.6.X ( Include previous versions ) .
    My way:

    1. First download last xampp portable(my using version: xampp-portable-win32-5.6.14-3-VC11Direct Download Link) Last XAMPP
    2. Extract new download file to drive d , because new version dont have mercury,filezilla,tomcat in it , then i copy these packages from my old version to new one
    3. Now on old xampp first copy all htdocs files to new xampp htdocs
    4. Now on old xampp backup all of database in 5 two 10 separated sql files
    5. Now on new xampp going and change some settings like max_upload_size and etc on php.ini and also in /apache/conf/extra/httpd-xampp.conf
    6. Now delete ( make a rar archive and delete ) it , and copy new xampp from drive D to drive C
    7. Now start new xampp , going to phpmyadmin , create a user and password that i use in previous xampp and add all privileges that user.
    8. Now going to import tab on phpmyadmin and separately import sql files.
    9. Now i test xampp with all new features in drive C

    NOTE
    On Export database tab on phpmyadmin, select UTF-8 Character and check Disable foreign key checks checkbox
    and on import tab uncheck Enable foreign key checks .

    answered Nov 20, 2015 at 8:20
    893 1 1 gold badge 13 13 silver badges 24 24 bronze badges

    1) Backup your htdocs folder
    2) export your databases (follow this tutorial)
    3) uninstall xampp
    4) install the new version of xampp
    5) replace the htdocs folder that you have backed up
    6) Import your databases you had exported before

    Note: In case you have changed config files like PHP (php.ini), Apache (httpd.conf) or any other, please take back up of those files as well and replace them with newly installed version.

    answered Jun 28, 2016 at 16:42
    csandreas1 csandreas1
    2,170 1 1 gold badge 31 31 silver badges 53 53 bronze badges

    To update with latest PHP version in xampp without losing your htdocs data you need to download the zip file of your desired version of PHP from sourceforge.net, then copy the PHP folder from the extracted file and paste it into your xampp folder.

    NOTE: Don’t forget to rename the old PHP file folder which already exists.

    Then simply edit your php.ini file with the current path to reach the right PHP folder

    After that, you need to re-run your xampp.

    I found a video on youtube which can help you. how to update php version in xampp

    answered Jun 10, 2018 at 21:01
    239 5 5 silver badges 16 16 bronze badges

    1) Download new PHP from the official site (better some zip). Old php directory rename to php_old and create again php directory and put there unzipped files.

    In php.ini connect needed modules if you used something that was turned off by default (like Memcached etc.), but doesn’t forget to add corresponding .dll files.

    2) In my case, I had to update Apache. So repeat the same steps: download the new package, rename directories, create new apache directory and put their new files.

    Now you can try to restart apache running apache_start.bat from xampp folder (better run this bat, than restart apache service from Windows services window, cause in this case in console you’ll see all errors if there will be some, including lines in config where you’ll have problem). If you updated Apache and run this file, in the list of services you’ll see Apache2.2, but in description you can get another version (in my case that was Apache/2.4.7).

    In case of Apache update you can get some problems, so mind:

    • after you replace the whole directory, you may need to configure you apache/conf/httpd.conf file (copy virtual hosts from old config, set up DocumentRoots, permissions for directories, all paths, extend the list of index files (by default apache has only index.html so other index files will be just ignored and Apache will just list the site root directory in browser), configure you logs etc.)
    • connect modules you need (if you used something that was not turned on by default like mod_rewrite etc.)

    1,106 1 1 gold badge 18 18 silver badges 29 29 bronze badges
    answered Jul 28, 2014 at 13:59
    5,015 8 8 gold badges 39 39 silver badges 56 56 bronze badges

    The ultimate guide to upgrading XAMPP and PHP

    Note that it’s not recommended to just swap out an older version of PHP in XAMPP to a newer version, as there’s the possibility it could introduce problems and incompatibilities due to tools, configurations and codebases that weren’t designed to play together.

    Instead, it’s a much safer idea to update the PHP version with the rest of XAMPP — this will upgrade both PHP and any other binaries that PHP needs to work with, including MySQL and PHPMyAdmin, to versions that are designed to be compatible with it. This way you will also be able to take advantage of the security and speed advantages of updating to newer versions — for example, modern versions of PHPMyAdmin are miles faster and much less buggy than versions that are a few years old.

    Unfortunately there is no easy way to update XAMPP, which is bizarre considering how old and mature it is as a project, but the good news is it can be easily accomplished using the steps below.

    How to properly update XAMPP and PHP 8.x

    1. Rename your current, working XAMPP folder (located at C:\xampp by default) to XAMPP.old or something similar to indicate it’s the old version.
    2. Download the XAMPP installer for the version of XAMPP/PHP you want (the XAMPP version mirrors the PHP version to make it easier to know which PHP version you’re getting), and install it to C:\xampp .
    3. Go through the install process and feel free to deselect any software you don’t need — like Mercury Mail and Tomcat — to prevent them cluttering up your installation, then wait for the install to complete.
    4. Delete the following folders from C:\xampp and copy and paste their equivalents from C:\xampp.old :
    htdocs mysql\data mysql\backup 

    You’ve now moved all of your website and database data over from your last installation, so if you didn’t customise your XAMPP configuration a lot or don’t care about moving your configuration over, you can stop at this stage and you will have a fully-working installation of XAMPP running on your new version of PHP, along with new software that is compatible with it.

    Next, you need to copy over the configuration files from your old XAMPP installation at C:\xampp.old to the new one at C:\xampp .

    First is the php\php.ini file — this file should not simply be copied over, as it contains configuration options that are very specific to the current PHP installation. If you’ve made changes to it or you’re not sure whether you have, you can use a diff tool like diff —color -y to compare your old php.ini file with the one you just installed — if you see any lines in red, these are the lines you might need to copy over to your new C:\xampp\php.ini file, although note that even many of these might be unnecessary — usually they are removed by the developers because they’re no longer needed by the newer PHP version.

    The remaining configuration files and folders can simply be copied below into the same locations on C:\xampp , replacing the newer versions:

    apache\conf\httpd.conf apache\conf\ssl.crt apache\conf\ssl.csr apache\conf\ssl.key phpmyadmin\config.inc.php apache\conf\extra\httpd-vhosts.conf 

    All of these changes should be pretty safe but it’s always a good idea to keep the C:\xampp.old folder around for a few weeks while you’re testing out your new XAMPP server. If it turns out you missed something you can then just copy it over later.

    You should now be able to open the XAMPP Control Panel to start the server and confirm that your new versions of Apache and MySQL are working, and visit localhost/phpmyadmin to confirm that the latest version of PHPMyAdmin has been installed successfully. Finally, run php -v to confirm that you’re on the installed version of PHP.

    КАК ОБНОВИТЬ PHP НА WORDPRESS

    Для обновления PHP на WordPress нужно выполнить несколько шагов:

    1. Проверьте минимальную версию PHP, которую поддерживает ваша версия WordPress. Эту информацию можно найти на официальном сайте WordPress. Если ваша версия WordPress не поддерживает новую версию PHP, вам нужно обновить WordPress до последней версии.

    2. Проверьте текущую версию PHP на вашем сервере. Для этого можно использовать функцию phpinfo(). Просто создайте новый файл phpinfo.php в корневой директории сайта и добавьте следующий код:

    3. Обновите версию PHP на сервере. В зависимости от вашего провайдера хостинга и доступных вариантов обновления, это может быть выполнено различными способами. Для этого можно связаться со службой поддержки вашего провайдера, чтобы получить инструкции по обновлению PHP.

    Ошибка WordPress. Как обновить PHP

    Обновление WordPress. Как правильно обновить плагины и темы?

    Как обновить версию PHP на сайте WordPress

    Как обновить php на wordpress.

    Как обновить версию php wordpress — На примере хостинга beget

    PHP 8: план обновления

    #85. Как обновить PHP на WordPress

    УСТАНОВКА и НАСТРОЙКА WORDPRESS на локальном компьютере [сервер XAMPP] — Вордпресс с нуля

    Как обновить версию php сайта на WordPress �� на хостинге Timeweb до версии 7 + — Windows Страницу

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *