<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.apoyar.eu/index.php?action=history&amp;feed=atom&amp;title=Upgrading_Major_Versions_of_PHP</id>
	<title>Upgrading Major Versions of PHP - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.apoyar.eu/index.php?action=history&amp;feed=atom&amp;title=Upgrading_Major_Versions_of_PHP"/>
	<link rel="alternate" type="text/html" href="https://wiki.apoyar.eu/index.php?title=Upgrading_Major_Versions_of_PHP&amp;action=history"/>
	<updated>2026-07-20T14:07:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.apoyar.eu/index.php?title=Upgrading_Major_Versions_of_PHP&amp;diff=209&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;                                  PHP UPGRADING ------------------  •	For checking the version of PHP the command is php –v.  •	root@live:/home/neal # php –v.Now we ar...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.apoyar.eu/index.php?title=Upgrading_Major_Versions_of_PHP&amp;diff=209&amp;oldid=prev"/>
		<updated>2021-07-27T05:52:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;                                  PHP UPGRADING ------------------  •	For checking the version of PHP the command is php –v.  •	root@live:/home/neal # php –v.Now we ar...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;                                 &lt;br /&gt;
PHP UPGRADING&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
•	For checking the version of PHP the command is php –v.&lt;br /&gt;
&lt;br /&gt;
•	root@live:/home/neal # php –v.Now we are using the version of PHP 7.0 but that was last till is 1st jan 2019 for Apoyar_live_test.&lt;br /&gt;
&lt;br /&gt;
•	First we should find the list of modules for that &lt;br /&gt;
&lt;br /&gt;
•	  root@live:/home/neal # php –m&lt;br /&gt;
&lt;br /&gt;
•	This above command gives the list of all the php modules which are on php version.There is an list of modules we should have to follow that.Now we&lt;br /&gt;
 should remove all the modules and replace the modules with new one.&lt;br /&gt;
&lt;br /&gt;
•	root@live:/home/neal # dpkg  -l  grep php.&lt;br /&gt;
&lt;br /&gt;
•	This command gives the modules which are present on php version and in this packages will contain more than one module.&lt;br /&gt;
&lt;br /&gt;
•	Now we need to remove all the packages one by one by using the command.&lt;br /&gt;
&lt;br /&gt;
•	root@live:/home/neal # apt-get purge php7.0 php7.0-common php7.0-curl php7.0-fpm.&lt;br /&gt;
&lt;br /&gt;
•	First we should execute above command and remove this four modules due to the dependencies it will remove more modules.after completion of this.&lt;br /&gt;
&lt;br /&gt;
•	Again execute the below command it will shows which are still available modules.&lt;br /&gt;
&lt;br /&gt;
•	root@live:/home/neal # dpkg  -l  grep php&lt;br /&gt;
&lt;br /&gt;
•	This shows the remaining modules we should remove them also for that.&lt;br /&gt;
&lt;br /&gt;
•	root@live:/home/neal # apt-get purge php-common.&lt;br /&gt;
&lt;br /&gt;
•	Now we should install the 7.4&lt;br /&gt;
&lt;br /&gt;
•	root@live:/home/neal #  apt-get install php7.4 &lt;br /&gt;
&lt;br /&gt;
•	Now we should see the list for this &lt;br /&gt;
&lt;br /&gt;
•	root@live:/home/neal # dpkg  -l  grep php&lt;br /&gt;
&lt;br /&gt;
•	There we can see php 7.4.now we should search for list of modules by using this below command.&lt;br /&gt;
&lt;br /&gt;
•	root@live:/home/neal # php –m&lt;br /&gt;
&lt;br /&gt;
•	By this we can see list of modules which are installed with php7.4 now we should compare the modules with the previous version of php and we have &lt;br /&gt;
install the missing modules.&lt;br /&gt;
&lt;br /&gt;
•	root@live:/home/neal #  apt-get install php7.4-curl php7.4-dom php7.4-mbstring php7.4-mysql php7.4-sqlite php7.4-pgsql &lt;br /&gt;
&lt;br /&gt;
•	Now we should remove apache as nginx is already running on the port.For removing apache.&lt;br /&gt;
&lt;br /&gt;
•	 root@live:/home/neal # dpkg  -l  grep apache&lt;br /&gt;
&lt;br /&gt;
•	root@live:/home/neal # apt-get purge apache2 apache2-bin apache2-data apache2-utils.&lt;br /&gt;
&lt;br /&gt;
•	Now we should replace this php7.4 in nginx configurations.&lt;br /&gt;
&lt;br /&gt;
•	root@live:/etc/nginx/sites-available# vi apoyarcloud.conf&lt;br /&gt;
&lt;br /&gt;
•	After going into that file under the location ~ \.php$ {&lt;br /&gt;
&lt;br /&gt;
•	Under that it shows the old version of php for upgrading there we should go to below path&lt;br /&gt;
&lt;br /&gt;
•	root@live:/etc/nginx/sites-available#&lt;br /&gt;
&lt;br /&gt;
•	After going into that path with should run below command.&lt;br /&gt;
&lt;br /&gt;
•	grep -rli &amp;#039;php7.0&amp;#039; * | xargs -i@ sed -i &amp;#039;s/php7.0/php7.4/g&amp;#039; @&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>