• Home
  • WordPress
  • web Hosting
    • Free hosting
    • Cheap Hosting
    • comparison cloud , vps, shared, wordpress
    • managed wordpress hosting
    • managed cloud hosting
  • page Speed
  • Deals
  • Services
  • About

RAaz Kumar .com

wordpress tutorials seo hosting etc


upgrade php fpm ubuntu nginx 7.4 to 8.2

upgrade php7.4 to 8.2 ubuntu

its better install php  8.0   and remove 7.4 or change to socket from tcp.

Latest php version

as of now php8.2

 

List php 7.4 extensions

dpkg -l | grep php7.4

 

Install php 8

in ubuntu 20/04 LTS default php installation is php 8

add repo

sudo add–apt–repository ppa:ondrej/php

or

sudo LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php

and update

 

sudo apt-get update &&  sudo apt-get install php8.0-fpm

or

sudo apt-get update &&  sudo apt-get install php8.2-fpm

 

sudo apt install php8.0-common php8.0-mysql php8.0-xml php8.0-xmlrpc php8.0-curl php8.0-gd php8.0-imagick php8.0-cli php8.0-dev php8.0-imap php8.0-mbstring php8.0-opcache php8.0-soap php8.0-zip php8.0-intl -y

 

php -v
PHP 8.0.27 (cli) (built: Jan 6 2023 15:27:43) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.27, Copyright (c) Zend Technologies
with Zend OPcache v8.0.27, Copyright (c), by Zend Technologies

root@ubuntu-s-2vcpu-4gb-intel-blr1-01:/etc/php# php -v
PHP 8.2.1 (cli) (built: Jan 6 2023 15:18:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.1, Copyright (c) Zend Technologies
with Zend OPcache v8.2.1, Copyright (c), by Zend Technologies

root@ubuntu-s-2vcpu-4gb-intel-blr1-01:~#

Configuring php 8.o for nginx

  1. Delete the default PHP 8.0 worker pool configuration.
    $ sudo rm /etc/php/8.0/fpm/pool.d/*
    
  2. Copy the configuration from PHP-FPM 7.4 to PHP-FPM 8.0.
    $ sudo cp -rL /etc/php/7.4/fpm/pool.d/* /etc/php/8.0/fpm/pool.d/

 

Configuring php 8.2 for nginx

Delete the default PHP 8.2 worker pool configuration.

$ sudo rm /etc/php/8.2/fpm/pool.d/*

Copy the configuration from PHP-FPM 7.4 to PHP-FPM 8.2.

$ sudo cp -rL /etc/php/7.4/fpm/pool.d/* /etc/php/8.2/fpm/pool.d/

 

Configuring listening socket or Port for php 8.2 fpm

/etc/php/8.2/fpm/pool.d/www.conf

my case If the old socket is 127.0.0.1:9000: same with nginx config file

Update php ini values in php 8 folder

/etc/php/7.4/fpm/php.ini, then copy those settings to the main PHP 8.0 configuration file /etc/php/8.0/fpm/php.ini.

 

Php ini values

max_execution_time

memory_limit

post_max_size

upload_max_filesize

date.timezone

 

 

memory_limit = 256M

max_execution_time   my case 300s or 5 minutes
upload_max_filesize  65MB 

 

Verify new php 8.2 confugration

 

 

sudo php-fpm8.2 -t

root@ubuntu-s-2vcpu-4gb-intel-blr1-01:~# sudo php-fpm8.2 -t
[12-Jan-2023 09:41:57] NOTICE: configuration file /etc/php/8.2/fpm/php-fpm.conf test is successful

reload php 8.2 apply changes

sudo systemctl reload php8.2-fpm.service

do not enable on start up if we keep them.

sudo systemctl disable –now php7.4-fpm.service

sudo systemctl disable –now php8.0-fpm.service

check which fpm manager running

ps aux | grep php

root@ubuntu-s-2vcpu-4gb-intel-blr1-01:~# ps aux | grep php
root 6531 0.0 0.3 239560 13368 ? Ss 2022 3:22 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)

 

finally start the php 8.2 service

sudo systemctl stop php7.4-fpm.service && sudo systemctl start php8.2-fpm.service

root@ubuntu-s-2vcpu-4gb-intel-blr1-01:~# ps aux | grep php root 831891 0.6 0.6 216160 25332 ? Ss 09:53 0:00 php-fpm: master process (/etc/php/8.2/fpm/php-fpm.conf)

Uninstall/Remove PHP 7.x and Extensions

 

or keep it as backup change tcp port listening socket

/var/run/php/php7.4-fpm.sock  or

127.0.0.1:9001

To uninstall PHP 7.x and all of its extensions, run the command below.

 

Monitor errors in the nginx log

 

tail -f /var/log/nginx/error.log

Note: WordPress plugins & themes need to update their php scripts according to php8.1  (check new features & fixes) new version prone to  bugs.

sudo apt-get purge php7.*


E: The repository 'http://ppa.launchpad.net/certbot/certbot/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

Related topics:

  1. php fpm install ubuntu 20.04 nginx
  2. Upgrade Ubuntu from 18.04 (19.10) to 20.04 LTS command line or gui server | desktop
  3. how to uninstall package in linux ubuntu rpm, yum apt-get
  4. install LEMP Stack on 22.04 LTS Nginx MySQL PHP fpm #wordpress #digital ocean
  5. Lamp stack install on Ubuntu 20.4 LTS apache, mysql, php 7.4(Debian 9 & Ubuntu 18.04 lts)

tutorials

  • Vivek Bindra Videos Transcription (business strategy)
  • git commands
  • new relic php agent install in 3 steps
  • new relic mysql install integration - 2 ways fix problems
  • new relic installation linux (infrastructure agent , php, mysql , nginx)
  • xampp tutorials 2021 installation errors fix wordpress phpmyadmin mysql apache
  • Redis performance metrics & tuning for nginx apache ubuntu & debian
  • Devops course Syllabus topics PDF AWS, Azure, cisco, redhat
  • CCNA Syllabus pdf (CCNA / CCNP vs devops vs mcsa /MCSE)
  • how to create a website free of cost on google
  • what is vpn vs proxy vs tor, http vs https, http2, tcp vs udp, kali linux sql source code injection
  • nginx server tutorials (installation, configuration, performance tuning, security)
    • Top 10 tips to improve nginx server security
    • upgrade php fpm ubuntu nginx 7.4 to 8.2
    • install phpmyadmin ubuntu nginx 22.04
    • php fpm install ubuntu 20.04 nginx
    • nginx upstream response is buffered to a temporary file
    • php fpm ondemand vs dynamic vs Static (the dynamic pool problem)
    • Php fpm configuration for 1000 concurrent connections server busy max children reached
    • php fpm seems busy fixed warning and max children reached to handle max connections / requests
    • newrelic nginx integration process and errors fix and metrics
    • datadog nginx integration installation process
    • nginx rate limiting explained by location time specific url
    • SSL faster reduce TLS hand shake improve https performance
    • monitor nginx request with nginx status amplify datadog new relic
    • nginx installation on ubuntu 20.04 LTS
    • enable brotli compression nginx brotli vs gzip
    • nginx performance tuning
    • Letsencrypt SSL Installation on apache/Nginx ubuntu / debian wordpress
    • letsencrypt install configure on ubuntu / debian nginx
    • what is TTFB & how to Reduce it (server response time) Google pagespeed
    • php fpm restart nginx ubuntu enable status page, monitor etc
    • php fpm pool manager configuration settings based on server spike high cpu wordpress
    • nginx modules list (enable, disable, upgrade, install dynamic module)
    • nginx rewrite rules with examples 301 redirection
    • use nginx as reverse proxy and load balancer for apache wordpress
    • nginx conf explained best config file performance tuning tips nginx.conf location errors tutorial
    • nginx errors (504,502, 413, unable to start, syntax errors)
    • Pagespeed module install, configure, monitor, errors ft nginx &apache
    • Apache vs nginx (connection handling, modules, memory usage)
    • install LEMP Stack on 22.04 LTS Nginx MySQL PHP fpm #wordpress #digital ocean
    • nginx fastcgi cache wordpress how to configure
    • fix error 520 522 524 on cloudflare wordpress godaddy nginx etc
  • MySQL Tutorial (create,connect database, update tables, export etc) Documentation & TIPS
  • AUdio Editing Background Noise removal (Audacity, Adobe Premiere Addition, Camtasia Filmora Windows Obs)
  • Android Studio tutorials syllabus Topics Course details #AndroidApplicationDevelopment
  • [INTRO] Ethical hacking / cyber Security / Penetration testing Tutorial -{updates frequently}
  • redis install ubuntu 20.04 with wordpress php redis mysql configuration
  • ubuntu tutorials installation download issues etc
  • Php tutorials
  • HTML & CSS Tutorials
  • Core Java Tutorial Free online
  • Linux sysadmin tutorials linux system administrator
  • apache server tutorial (install,config, performance tuning, security, error handling)

 

 

wordpress Pagespeed optimization

Digitalocean free $100 Credit

Cloudways Review pricing promo codes

Siteground cpu limits Pricing

Shared Hosting

Managed wordpress Hosting

Managed Hosting Cloud server

VPS Hosting

Cloud Hosting – Unmanaged

Google cloud Pricing

Aws Pricing

Azure pricing

nginx server tutorials

apache server tutorials

linux sysadmin tutorials

mysql Commands list pdf

LEMP Install Ubuntu

Mysql Performance Tuning

Nginx Performance tuning

Linux Performance tuning

Php -fpm performance tuning

Redis Performance tuning

linux server security

nginx security best practices

wordpress security plugins

 

 

wordpress

 

Top 5  WP Google Analytics Plugins

WP Backup Plugins

Wp Comment Plugins

Top wordpress Security Plugins

WP Seo Plugins

WP Caching Plugins

Best Adsense Plugins for WordPress

Wp social Sharing Plugins

autoshare social media plugins

WP speed Optimization Plugins

Speedup WordPress google Score

More Wp tuts

Server Admin Cloud

 

Installing Nginx LEMP On ubuntu

Installing apache Lamp ubuntu

nginx fastcgi cache enable

php – fpm install  & Configuration

Opcache install & Configure

php -fpm pool manager explained

Mysql Install & Configuration

Redis Object cache install & configure

 

Nginx as Reverse Proxy and Load balancer

Load Balance / auto scaling in google cloud

Linux Commands PDF

Mysql Commands Pdf

Letsencrypt tutorial

mysqldump export & import 

Pagespeed Module install & configure

nginx.conf best file

mysql.conf best file

upgrade ubuntu

© 2023 - All Rights Reserved Disclaimer & Privacy Policy