How to Update PHP in Ubuntu (to any version)

Поделиться
HTML-код
  • Опубликовано: 15 июл 2024
  • Learn how to update PHP in Ubuntu to any version including the supported version 7.3, 7.4, and 8.0. This will work for PHP version 5.6 and above. We will use the update-alternatives command to change the system version of PHP that is installed.
    Find more at tonyteaches.tech
    Check out my vlog channel ‪@TonyFlorida‬
    #php
  • ХоббиХобби

Комментарии • 93

  • @mohamedgomaa2940
    @mohamedgomaa2940 6 месяцев назад +1

    I keep coming for that video when i have such struggle with PHP versions, thank you.

  • @jagan2explore
    @jagan2explore 3 года назад +5

    Thank you for the tutorial. I have to rewind several times to follow. But gets my job done.

  • @kipkoechhillary3371
    @kipkoechhillary3371 Год назад

    Thank you for this video. it surely saved my long time properly

  • @ashique12009
    @ashique12009 6 месяцев назад

    This is wonderful stuff 👌Thanks!

  • @bigpapa59460
    @bigpapa59460 3 года назад +2

    Thank you for saving me ! Great Tutorial

  • @navid-bakhtiary
    @navid-bakhtiary 10 месяцев назад

    thanks tony. your tutorial helped me.

  • @developingitm5960
    @developingitm5960 3 года назад +1

    Greate tutorial ! thanks for helping the community

  • @fajarsetiawansiagian
    @fajarsetiawansiagian 2 месяца назад

    thanks for your info. it helps me to understand how to change php version

  • @robertphillips124714
    @robertphillips124714 Год назад

    really helpful! thank you!

  • @Vikaskumar-ur5di
    @Vikaskumar-ur5di Год назад

    thanks for sharing amazing video, i am looking this type of video.

  • @hgy383
    @hgy383 Год назад

    thank you so much, it is exactly what I am looking for.

  • @azmifarhan1196
    @azmifarhan1196 3 года назад

    thank you tony, it means a lot to me.

  • @bryanportillo9772
    @bryanportillo9772 2 года назад

    AWESOME!!!! Thanks a lot buddy.

  • @chandarayi5673
    @chandarayi5673 28 дней назад

    This is aswesome, thank youuu

  • @PumpkinSpicePretzels
    @PumpkinSpicePretzels 2 года назад

    Yay I can hear you loud and clear with no thick accent in a dungeon.

  • @uzairsaeed8477
    @uzairsaeed8477 Год назад

    You are legend thanks Man !

  • @newblogr1260
    @newblogr1260 Год назад +2

    Hi Tony. Love your videos. When I access my OpenLitespeed server using SSH, it tells me I can Upgrade Ubuntu To 22.04. Do you recommend doing this?

  • @danielkardos7583
    @danielkardos7583 2 года назад

    ily my guy

  • @alexintech254
    @alexintech254 3 года назад

    Thank you man

  • @kugwa
    @kugwa 2 года назад

    thank you so much

  • @angelbmxg
    @angelbmxg Год назад

    Thanks bro

  • @Sufivlogs8182
    @Sufivlogs8182 5 месяцев назад

    It's fabulous

  • @bimbim1862
    @bimbim1862 2 года назад

    hello what different :
    a2enmod proxy_fcgi setenvif && a2enconf php8.1-fpm
    AND
    a2enmod actions fcgid alias proxy_fcgi
    is must run ?

  • @auberginesoep
    @auberginesoep Год назад

    Bedankt

  • @abdiag603
    @abdiag603 2 года назад

    Will one need to restart/reload the server for changes to take effect? just asking

  • @ashique12009
    @ashique12009 4 месяца назад

    This is good but could you show us something a good alternative
    like Laragon or Laravel Herd in Ubuntu?
    Where we can switch PHP version easily without going to terminal.
    Thanks!

  • @ludy997
    @ludy997 2 года назад

    thx

  • @muafaa
    @muafaa Год назад

    can i install php 7.4 in Ubuntuk 18.10 now? since the repsitories you used in this video no longer suppport Ubuntu 18.10

  • @kaykayadarsh2207
    @kaykayadarsh2207 2 года назад

    After successfully installing php8.0 my phpmyadmin is not working it is showing a blank page but when disabled 8.0 php and again enabled my php7.2 it again start working can you please help me out here?

  • @user-hz4yr3rz8z
    @user-hz4yr3rz8z 4 месяца назад

    i try but /opt/lampp/bin/php -v and php --version give two different verion of php

  • @razuahammad55
    @razuahammad55 8 месяцев назад

    Does Root access required ?

  • @Azharuddinkhan2602
    @Azharuddinkhan2602 2 года назад

    Sir please help me.. 🙏😓
    When I am typing: add-apt-respository ppa:ondrej/php
    It is showing cannot add ppa: ‘ppa:~ondrej/Ubuntu/php
    Error: ‘~ondrej’ user or team does not exist

  • @CarlosMarli_
    @CarlosMarli_ 2 года назад

    I follow this tutorial but I still get the message "PLUGIN need php 7.3 or higher , your are using 7.2.24-0ubuntu0.18.04.12."

  • @aitrahouabdlwahd3772
    @aitrahouabdlwahd3772 Год назад

    Hi please how to install php 5.5.9 on ubuntu ❤

  • @zackrag2135
    @zackrag2135 2 года назад

    thank you so much for the video my question is I installed Wordpress while I was using 7.14 version but when I switch to 8.0 my website or the Wordpress doesn't load and gives "501 bad gateway ' error so do I need to install another Wordpress for the 8.0 version? or how do I make it work

    • @zackrag2135
      @zackrag2135 2 года назад

      in other words do i need to make a new directory for my website on the 8.0 version of php

  • @agnemedia624
    @agnemedia624 3 года назад +1

    Great tutorial (what will be a Wordpress site 1 with php 7.3 and Wordpress site 2 with php.x 7.4 : and Wordpress website with php.x 5.4 - setting up and assigned php options ?)
    Sample; ubuntu has websites and site A need php 5.4x and site B need 7.2x others is fine with 7.4x

  • @vectorv750
    @vectorv750 2 года назад

    Hi everyone I would like to ask for some advice from this community of web developers about the problem that I am facing right now as I am personally an IT person. I hired a web developer to develop an e-commerce website for me. Yesterday I came to know that the PHP version that was used to creat the website was very old, it’s PHP 5.6. A friend of mine who a understand a thing or two about the web development, said that this web developer had you, in an ugly way thoroughly. What he meant is that the version is to old. And it’s practically useless. He said it’s impossible to upgrade it or do anything about it. He said the web developer sold me a useless website. If it’s not a problem for you guys, could you please enlighten me as how bad is my situation here, and if my friend is right. Because, though my friend understanding something about web developing but he is not a professional.

  • @frjgg1
    @frjgg1 3 года назад

    Congratulations on the video, I had a question, I have updated the php version in ubuntu 16.04, the problem is that since I update it when I try to enter roundcube the screen to login appears, but when I try to enter it shows a blank screen with error 500. Could it be that I am missing something more than install? i have apache server. Well congratulations again for the channel! and sorry for my english.

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      Error 500 is an internal server error. This could be a number of different problems. Have you already looked at the logs and determined that this is indeed a PHP error?

  • @irvingmontes8179
    @irvingmontes8179 3 года назад +2

    Make a video switching php versions for apache and ngnix

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад +1

      Please reference the installed version directly:
      /usr/bin/php7.4
      /usr/bin/php8.0

  • @Jseee
    @Jseee 2 года назад

    I've just done this for a client's site and it's still showing the outdated PHP version in the WP dashboard. Does this usually take time to propagate or should this be instant?

    • @TonyTeachesTech
      @TonyTeachesTech  2 года назад

      It should be instant. Perhaps restarting your web server

  • @pahtashow
    @pahtashow 3 года назад

    php --version
    PHP 8.0.3 (cli) (built: Mar 5 2021 07:53:56) ( NTS )
    Strange my Ubuntu 18.04 can update to PHP 8.0.3.
    In my case what I have to do if my system can update to PHP 8.0.3 ?

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      Perhaps this is possible now. I would try it out to see if it works

  • @muhammadfikrihaiqal3778
    @muhammadfikrihaiqal3778 2 года назад

    Please help, sir, in php cli, the version has changed to php 8. but when I upload the project on the web server. I checked phpinfo(); the php version is still at 7.4. so when I run a php 8-based project but run on a webserver, there are a lot of errors. how do i change to the one on apache2? I've done commands like "sudo a2enmod php8.0" and "sudo a2dismod php7.4" but still in php info it still goes to 7.4 . but for the CLI it has changed to php 8

    • @TonyTeachesTech
      @TonyTeachesTech  2 года назад

      Check out this video ruclips.net/video/vJw6SX1fdUo/видео.html

  • @rockstarhub6945
    @rockstarhub6945 3 года назад +2

    Sir please make a video how to add wordpress site to loadbalancer. Sir please make a video on this, I have been looking for such a video for a long time. Please make a video. How to add wordpress site to loadbalancer

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      I don't have any experience in this realm, but perhaps in the future this could be a topic

  • @arunkumar-cs1kd
    @arunkumar-cs1kd 3 года назад

    I need exactly same tutorial for aws linux 2, any resource or guidance please.

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад +2

      Sorry, I'm not familiar with AWS right now

    • @Vikaskumar-ur5di
      @Vikaskumar-ur5di Год назад

      @@TonyTeachesTech I have try aws ec2 machine its working fine

  • @Azharuddinkhan2602
    @Azharuddinkhan2602 2 года назад

    Sir please help me my mind is not working

  • @princechandel5618
    @princechandel5618 2 года назад

    after follow your troubleshooting step not issue has resolved, getting error php.info showing old version, if anyone have solution let me update

    • @TonyTeachesTech
      @TonyTeachesTech  2 года назад

      Sorry , I'm not sure why it's showing the old version

  • @AnkushKumar-bh1bv
    @AnkushKumar-bh1bv 2 года назад

    can you share php restart command,
    I am using php7.4.3 ver

  • @kooponindia6378
    @kooponindia6378 3 года назад

    got this error after PFP update. Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
    :-(

  • @Luis-uq4sp
    @Luis-uq4sp 3 года назад

    please make a wordpress migration video. migrating to Linode.

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад +1

      Hi Luis, I have this video which will show you how to do just that ruclips.net/video/QSJlmh_x_UQ/видео.html

  • @chirdent23
    @chirdent23 Год назад

    Not work for me in 03:26
    my output :
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package php7.3
    E: Couldn't find any package by glob 'php7.3'
    E: Couldn't find any package by regex 'php7.3'

    • @apu6289
      @apu6289 2 месяца назад

      me too. If you fixed the error, please share me. Thanks

    • @chirdent23
      @chirdent23 2 месяца назад

      @@apu6289 Unfortunately, I did not find a solution

  • @bhavinkarthiya5421
    @bhavinkarthiya5421 2 года назад

    How I set php 7.0 in google cloud??

  • @10vingers
    @10vingers Год назад

    So It's not an update, pfff.

  • @olekristianmller-hansen4220
    @olekristianmller-hansen4220 2 года назад

    Hi! When I enter the command "app-apt-repository ppa:ondrej/php", I get the following output:
    Exception in thread Thread-1:
    Traceback (most recent call last):
    File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
    File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
    File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 688, in addkey_func
    func(**kwargs)
    File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 386, in add_key
    return apsk.add_ppa_signing_key()
    File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 252, in add_ppa_signing_key
    tmp_keyring, tmp_secret_keyring, signing_key_fingerprint, tmp_keyring_dir):
    File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 181, in _recv_key
    "--recv", signing_key_fingerprint,
    File "/usr/lib/python3.7/subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
    File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
    File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'gpg': 'gpg'
    I have done some research, and almost all articles on the internet suggests that I add the US locale, however this is the only locale I ever had.
    I'm running Debian 10.12, nGinX 1.14.2 and PHP v7.3.31.
    I am completely lost and I have no clue what to do.
    Any help would be greatly appreciated.

    • @TonyTeachesTech
      @TonyTeachesTech  2 года назад

      Hmm I haven't seen that error before. Try one of these solutions www.google.com/search?q=%22No+such+file+or+directory+gpg