[{"data":1,"prerenderedAt":359},["ShallowReactive",2],{"blog-list-1":3},{"posts":4,"total":100},[5],{"id":6,"title":7,"body":8,"date":348,"description":349,"draft":350,"extension":351,"image":352,"meta":353,"navigation":176,"path":354,"seo":355,"stem":356,"updated":357,"__hash__":358},"blog\u002Fblog\u002Finstalling-multiple-php-versions-ubuntu-26-04.md","Installing Multiple PHP Versions on Ubuntu 26.04",{"type":9,"value":10,"toc":341},"minimark",[11,26,36,43,54,60,66,71,74,79,89,116,120,134,265,269,275,337],[12,13,14,15,25],"p",{},"When you needed multiple PHP versions on Ubuntu, the usual approach was to add ",[16,17,21],"a",{"href":18,"rel":19},"https:\u002F\u002Flaunchpad.net\u002F~ondrej\u002F+archive\u002Fubuntu\u002Fphp",[20],"nofollow",[22,23,24],"code",{},"ppa:ondrej\u002Fphp",". However, when I tried adding that PPA on Ubuntu 26.04 using the same approach that worked through 24.04, I received the following error:",[27,28,34],"pre",{"className":29,"code":31,"language":32,"meta":33},[30],"language-text","Error: The repository 'https:\u002F\u002Fppa.launchpadcontent.net\u002Fondrej\u002Fphp\u002Fubuntu resolute Release' does not have a Release file.\n","text","",[22,35,31],{"__ignoreMap":33},[12,37,38,39,42],{},"After looking into it, I found that this PPA is no longer available for Ubuntu 26.04 (Resolute). PHP package maintainer Ondrej Sury has consolidated the packages into ",[22,40,41],{},"packages.sury.org"," instead. The background is documented in the following issue:",[44,45,46],"ul",{},[47,48,49],"li",{},[16,50,53],{"href":51,"rel":52},"https:\u002F\u002Fcodeberg.org\u002Foerdnj\u002Fdeb.sury.org\u002Fissues\u002F91",[20],"oerdnj\u002Fdeb.sury.org Issue #91",[12,55,56,57,59],{},"The issue explains that packages for new Ubuntu LTS releases from 26.04 onward will be provided through ",[22,58,41],{},", a shared repository for Debian and Ubuntu, rather than through the Launchpad PPA.",[12,61,62,63,65],{},"Most articles about installing PHP on Ubuntu 26.04 focus on installing PHP 8.5 from the official APT repositories. As far as I could find, the issue above was the only source that covered installing multiple PHP versions using ",[22,64,41],{},". This article documents the procedure.",[67,68,70],"h2",{"id":69},"installation-steps","Installation Steps",[12,72,73],{},"The issue reports the following steps.",[75,76,78],"h3",{"id":77},"_1-remove-the-old-ppa-if-applicable","1. Remove the old PPA, if applicable",[12,80,81,82,84,85,88],{},"If you previously added ",[22,83,24],{},", remove it first to prevent 404 errors when running ",[22,86,87],{},"apt update",". Skip this step when installing PHP on a new system.",[27,90,94],{"className":91,"code":92,"language":93,"meta":33,"style":33},"language-bash shiki shiki-themes github-light github-dark","sudo add-apt-repository --remove ppa:ondrej\u002Fphp\n","bash",[22,95,96],{"__ignoreMap":33},[97,98,101,105,109,113],"span",{"class":99,"line":100},"line",1,[97,102,104],{"class":103},"sScJk","sudo",[97,106,108],{"class":107},"sZZnC"," add-apt-repository",[97,110,112],{"class":111},"sj4cs"," --remove",[97,114,115],{"class":107}," ppa:ondrej\u002Fphp\n",[75,117,119],{"id":118},"_2-add-the-new-repository","2. Add the new repository",[12,121,122,123,125,126,129,130,133],{},"Install the GPG keyring for ",[22,124,41],{},", then add the new repository under ",[22,127,128],{},"sources.list.d",". If PHP is already installed, run ",[22,131,132],{},"apt-get upgrade"," at the end to upgrade to packages from the new repository.",[27,135,137],{"className":91,"code":136,"language":93,"meta":33,"style":33},"sudo apt-get update\nsudo apt-get -y install lsb-release ca-certificates curl\n\n# Install the GPG keyring from the .deb package.\nsudo curl -sSLo \u002Ftmp\u002Fdebsuryorg-archive-keyring.deb https:\u002F\u002Fpackages.sury.org\u002Fdebsuryorg-archive-keyring.deb\nsudo dpkg -i \u002Ftmp\u002Fdebsuryorg-archive-keyring.deb\n\n# lsb_release -sc automatically detects \"resolute\" on Ubuntu 26.04.\nsudo sh -c 'echo \"deb [signed-by=\u002Fusr\u002Fshare\u002Fkeyrings\u002Fdebsuryorg-archive-keyring.gpg] https:\u002F\u002Fpackages.sury.org\u002Fphp\u002F $(lsb_release -sc) main\" > \u002Fetc\u002Fapt\u002Fsources.list.d\u002Fphp.list'\n\nsudo apt-get update\nsudo apt-get upgrade\n",[22,138,139,149,171,178,185,202,216,221,227,241,246,255],{"__ignoreMap":33},[97,140,141,143,146],{"class":99,"line":100},[97,142,104],{"class":103},[97,144,145],{"class":107}," apt-get",[97,147,148],{"class":107}," update\n",[97,150,152,154,156,159,162,165,168],{"class":99,"line":151},2,[97,153,104],{"class":103},[97,155,145],{"class":107},[97,157,158],{"class":111}," -y",[97,160,161],{"class":107}," install",[97,163,164],{"class":107}," lsb-release",[97,166,167],{"class":107}," ca-certificates",[97,169,170],{"class":107}," curl\n",[97,172,174],{"class":99,"line":173},3,[97,175,177],{"emptyLinePlaceholder":176},true,"\n",[97,179,181],{"class":99,"line":180},4,[97,182,184],{"class":183},"sJ8bj","# Install the GPG keyring from the .deb package.\n",[97,186,188,190,193,196,199],{"class":99,"line":187},5,[97,189,104],{"class":103},[97,191,192],{"class":107}," curl",[97,194,195],{"class":111}," -sSLo",[97,197,198],{"class":107}," \u002Ftmp\u002Fdebsuryorg-archive-keyring.deb",[97,200,201],{"class":107}," https:\u002F\u002Fpackages.sury.org\u002Fdebsuryorg-archive-keyring.deb\n",[97,203,205,207,210,213],{"class":99,"line":204},6,[97,206,104],{"class":103},[97,208,209],{"class":107}," dpkg",[97,211,212],{"class":111}," -i",[97,214,215],{"class":107}," \u002Ftmp\u002Fdebsuryorg-archive-keyring.deb\n",[97,217,219],{"class":99,"line":218},7,[97,220,177],{"emptyLinePlaceholder":176},[97,222,224],{"class":99,"line":223},8,[97,225,226],{"class":183},"# lsb_release -sc automatically detects \"resolute\" on Ubuntu 26.04.\n",[97,228,230,232,235,238],{"class":99,"line":229},9,[97,231,104],{"class":103},[97,233,234],{"class":107}," sh",[97,236,237],{"class":111}," -c",[97,239,240],{"class":107}," 'echo \"deb [signed-by=\u002Fusr\u002Fshare\u002Fkeyrings\u002Fdebsuryorg-archive-keyring.gpg] https:\u002F\u002Fpackages.sury.org\u002Fphp\u002F $(lsb_release -sc) main\" > \u002Fetc\u002Fapt\u002Fsources.list.d\u002Fphp.list'\n",[97,242,244],{"class":99,"line":243},10,[97,245,177],{"emptyLinePlaceholder":176},[97,247,249,251,253],{"class":99,"line":248},11,[97,250,104],{"class":103},[97,252,145],{"class":107},[97,254,148],{"class":107},[97,256,258,260,262],{"class":99,"line":257},12,[97,259,104],{"class":103},[97,261,145],{"class":107},[97,263,264],{"class":107}," upgrade\n",[75,266,268],{"id":267},"_3-install-multiple-php-versions","3. Install multiple PHP versions",[12,270,271,272,274],{},"Once the repository has been switched, usage is the same as it was with ",[22,273,24],{},".",[27,276,278],{"className":91,"code":277,"language":93,"meta":33,"style":33},"sudo apt install php8.3 php8.3-fpm php8.3-cli\nsudo apt install php8.4 php8.4-fpm php8.4-cli\n\n# Switch the active version.\nsudo update-alternatives --config php\n",[22,279,280,298,315,319,324],{"__ignoreMap":33},[97,281,282,284,287,289,292,295],{"class":99,"line":100},[97,283,104],{"class":103},[97,285,286],{"class":107}," apt",[97,288,161],{"class":107},[97,290,291],{"class":107}," php8.3",[97,293,294],{"class":107}," php8.3-fpm",[97,296,297],{"class":107}," php8.3-cli\n",[97,299,300,302,304,306,309,312],{"class":99,"line":151},[97,301,104],{"class":103},[97,303,286],{"class":107},[97,305,161],{"class":107},[97,307,308],{"class":107}," php8.4",[97,310,311],{"class":107}," php8.4-fpm",[97,313,314],{"class":107}," php8.4-cli\n",[97,316,317],{"class":99,"line":173},[97,318,177],{"emptyLinePlaceholder":176},[97,320,321],{"class":99,"line":180},[97,322,323],{"class":183},"# Switch the active version.\n",[97,325,326,328,331,334],{"class":99,"line":187},[97,327,104],{"class":103},[97,329,330],{"class":107}," update-alternatives",[97,332,333],{"class":111}," --config",[97,335,336],{"class":107}," php\n",[338,339,340],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":33,"searchDepth":151,"depth":151,"links":342},[343],{"id":69,"depth":151,"text":70,"children":344},[345,346,347],{"id":77,"depth":173,"text":78},{"id":118,"depth":173,"text":119},{"id":267,"depth":173,"text":268},"2026-08-03","A guide to installing multiple PHP versions on Ubuntu 26.04.",false,"md",null,{},"\u002Fblog\u002Finstalling-multiple-php-versions-ubuntu-26-04",{"title":7,"description":349},"blog\u002Finstalling-multiple-php-versions-ubuntu-26-04","2026-08-04","r8K9XzR5vfcFUS2pzY4we1gqpW_uaGAqhz7fVhVDouQ",1785899601103]