{"id":14222,"date":"2025-05-13T14:02:23","date_gmt":"2025-05-13T14:02:23","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=14222"},"modified":"2025-05-13T14:02:24","modified_gmt":"2025-05-13T14:02:24","slug":"how-to-install-php-on-debian-12","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/","title":{"rendered":"How to Install PHP on Debian 12"},"content":{"rendered":"\n<p>Linux, Windows, and Mac OS are among the many platforms on which PHP can run. PHP is compatible with a variety of databases and web servers, including MySQL, PostgreSQL, Apache, and NGINX. If you wish to set up a web server or start building online apps, installing PHP on Debian 12 offers several benefits. It enables users to dynamically generate web content by melding PHP scripts into HTML documents. In this article, I\u2019ll show you how to install and properly configure PHP on Debian 12.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#How-to-Install-PHP-on-Debian-12\">How to Install PHP on Debian 12?<\/a><\/li>\n\n\n\n<li><a href=\"#How-to-Switch-Between-PHP-Versions-(if-Needed)\">How to Switch Between PHP Versions?<\/a><\/li>\n\n\n\n<li><a href=\"#How-to-Run-Execute-a-PHP-Script-on-Debian-12\">How to Execute a PHP Script on Debian 12?<\/a><\/li>\n\n\n\n<li><a href=\"#Conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n\n\n\n<p>Let\u2019s start with the most straightforward method.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Install-PHP-on-Debian-12\"><a id=\"post-14222-_l8mufrpleqce\"><\/a>How to Install PHP on Debian 12?<\/h2>\n\n\n\n<p>This section focuses on different ways of installing PHP on Debian 12. Through its default repositories, Debian 12 offers a package containing PHP 8.4. The following methods detail installing PHP on Debian 12:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#Method-1:-Using-the-Default-Repository\">Method 1: Using the Default Repository<\/a><\/li>\n\n\n\n<li><a href=\"#post-14222-_dpg5b8xghho5\">Method 2: Using the PHP Official Website<\/a><\/li>\n\n\n\n<li><a href=\"#Method-3:-Using-a-Sury-PHP-Repository\">Method 3: Using a Sury PPA Repository<\/a><\/li>\n<\/ul>\n\n\n\n<p>Let\u2019s begin with the easiest one.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Method-1:-Using-the-Default-Repository\"><a id=\"post-14222-_v3odw9gkwfw2\"><\/a>Method 1: Using the Default Repository<\/h3>\n\n\n\n<p>Even though this method is stress-free, there is a potential chance that you may require a distinct PHP version. To install PHP on your Debian 12, within the given repository, follow the guidelines below:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_2ehhvbrcq0ss\"><\/a>Step 1: Update Debian Packages<\/h4>\n\n\n\n<p>Like all operating systems, software updates as well as security patches need to be regularly updated.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo apt update <br>sudo apt upgrade<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_i9rzyjyjzbt8\"><\/a>Step 2: Install PHP<\/h4>\n\n\n\n<p>Now, for installing PHP on Debian 12, use the apt repository and execute the following command:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo apt install php<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1145\" height=\"592\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-1.png\" alt=\"sudo apt install php\" class=\"wp-image-14223\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-1.png 1145w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-1-300x155.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-1-1024x529.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-1-768x397.png 768w\" sizes=\"(max-width: 1145px) 100vw, 1145px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Note<\/strong>: Users have the freedom to choose the specific PHP version they want to install, for example, one may choose to install a specific PHP version:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo apt install php&lt;version_name&gt;<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_9rcmykb4vqcs\"><\/a>Step 3: Confirm PHP Installation<\/h4>\n\n\n\n<p>The installation can be checked and the version confirmed by the command with the \u201cversion\u201d utility:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>php &#8211;version<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1152\" height=\"265\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-2.png\" alt=\"php --version\" class=\"wp-image-14224\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-2.png 1152w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-2-300x69.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-2-1024x236.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-2-768x177.png 768w\" sizes=\"(max-width: 1152px) 100vw, 1152px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Note<\/strong>: Always ensure the versions of PHP being used are up-to-date and supported for maximum performance as well as security.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_frdgws9qa6gy\"><\/a>Remove\/Uninstall PHP<\/h4>\n\n\n\n<p>When using Debian 12, you can uninstall PHP by executing the \u201cautoremove\u201d command with \u201capt\u201d:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo apt autoremove php<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1145\" height=\"498\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-3.png\" alt=\"sudo apt autoremove php\" class=\"wp-image-14225\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-3.png 1145w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-3-300x130.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-3-1024x445.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-3-768x334.png 768w\" sizes=\"(max-width: 1145px) 100vw, 1145px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>That is all from this section.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Method-2:-Using-the-PHP-Official-Website\"><a id=\"post-14222-_dpg5b8xghho5\"><\/a>Method 2: Using the PHP Official Website<\/h3>\n\n\n\n<p>This method lets users compile PHP from its source code and modify it to better suit their demands. Be \u201ctar.gz\u201d file accessible, to install PHP on Debian 12 follow these guidelines:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_pui9qdiffaie\"><\/a>Step 1: Install Dependencies for PHP<\/h4>\n\n\n\n<p>Depending on what methods you want to use, some of you might prefer to compile PHP manually, and for that, I have provided the complete packages needed to do so.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo apt install cmake build-essential autoconf pkg-config bison libxml2-dev re2c libsqlite3-dev<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1147\" height=\"525\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-4.png\" alt=\"sudo apt install cmake build-essential autoconf pkg-config bison libxml2-dev re2c libsqlite3-dev\" class=\"wp-image-14226\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-4.png 1147w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-4-300x137.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-4-1024x469.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-4-768x352.png 768w\" sizes=\"(max-width: 1147px) 100vw, 1147px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_mhp2v5lr1x21\"><\/a>Step 2: Download the Latest PHP Version<\/h4>\n\n\n\n<p>Start by downloading the appropriate version of PHP you are trying to download by visiting the <a href=\"https:\/\/www.php.net\/downloads\">official page<\/a> for PHP releases:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>wget https:\/\/www.php.net\/distributions\/php-8.4.7.tar.gz<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1140\" height=\"332\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-5.png\" alt=\"wget https:\/\/www.php.net\/distributions\/php-8.4.7.tar.gz\" class=\"wp-image-14227\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-5.png 1140w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-5-300x87.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-5-1024x298.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-5-768x224.png 768w\" sizes=\"(max-width: 1140px) 100vw, 1140px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Note<\/strong>: Make sure to double-check the official website to see if any newer versions have been released.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_j3c4f7em5dw6\"><\/a>Step 3: Extract the tar.gz File<\/h4>\n\n\n\n<p>Next, the users have to do the extraction of a certain file tar.gz. For this purpose, type the <strong>tar <\/strong>command and the name of the package that was downloaded:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>tar -xvzf php-8.4.7.tar.gz<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1144\" height=\"275\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-6.png\" alt=\"tar -xvzf php-8.4.7.tar.gz\" class=\"wp-image-14228\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-6.png 1144w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-6-300x72.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-6-1024x246.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-6-768x185.png 768w\" sizes=\"(max-width: 1144px) 100vw, 1144px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_7o15cmy9blzw\"><\/a>Step 4: Configure PHP<\/h4>\n\n\n\n<p>Then, you have to set the options for PHP that need to be configured. For this purpose, execute the \u201c<strong>.\/configure<\/strong>\u201d command within the directory extracted previously:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>cd php-8.4.7 <br>.\/configure<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1135\" height=\"530\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-7.png\" alt=\"Configure a PHP\" class=\"wp-image-14229\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-7.png 1135w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-7-300x140.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-7-1024x478.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-7-768x359.png 768w\" sizes=\"(max-width: 1135px) 100vw, 1135px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_x2tk339ab3mx\"><\/a>Step 5: Install PHP<\/h4>\n\n\n\n<p>To install, also set the dependencies for PHP. With those dependencies, grant PHP permissions and give the installation:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo make install<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1150\" height=\"318\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-8.png\" alt=\"sudo make install\" class=\"wp-image-14230\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-8.png 1150w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-8-300x83.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-8-1024x283.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-8-768x212.png 768w\" sizes=\"(max-width: 1150px) 100vw, 1150px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_79x3k11lln7k\"><\/a>Step 6: Add Path Environment<\/h4>\n\n\n\n<p>Now, the variable \u201c<strong>PATH<\/strong>\u201d needs to be defined where PHP has to be specified in the environment variable:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo nano ~\/.bashrc<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>Thereafter, add the line of script found at the last section of the \u201c<strong>.bashrc<\/strong>\u201d script beneath:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>export PATH=&#8221;$PATH:\/usr\/local\/bin\/php&#8221;<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1137\" height=\"762\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-9.png\" alt=\"Adding path environment variable\" class=\"wp-image-14231\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-9.png 1137w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-9-300x201.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-9-1024x686.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-9-768x515.png 768w\" sizes=\"(max-width: 1137px) 100vw, 1137px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_sl9gmu2rjwdg\"><\/a>Step 7: Verify PHP Installation<\/h4>\n\n\n\n<p>It allows visualizing the version of PHP alongside its other details that are purposely hidden until the command \u201c<strong>version<\/strong>\u201d is run:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>\/usr\/local\/bin\/php -v<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1138\" height=\"201\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-10.png\" alt=\"\/usr\/local\/bin\/php -v\" class=\"wp-image-14232\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-10.png 1138w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-10-300x53.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-10-1024x181.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-10-768x136.png 768w\" sizes=\"(max-width: 1138px) 100vw, 1138px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_o9jqmcabcizl\"><\/a>Remove\/Uninstall php<\/h4>\n\n\n\n<p>To delete\/uninstall PHP from Debian 12, simply invoke the command \u201crm\u201d with the following path specified:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo rm -rf \/usr\/local\/bin\/php<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1143\" height=\"143\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-11.png\" alt=\"sudo rm -rf \/usr\/local\/bin\/php\" class=\"wp-image-14233\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-11.png 1143w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-11-300x38.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-11-1024x128.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-11-768x96.png 768w\" sizes=\"(max-width: 1143px) 100vw, 1143px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>That is all from this section.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Method-3:-Using-a-Sury-PHP-Repository\"><a id=\"post-14222-_6031v1cstwtd\"><\/a>Method 3: Using a Sury PHP Repository<\/h3>\n\n\n\n<p>Let&#8217;s now enable the Sury PHP PPA repository, which contains PHP packages because it adds support for PHP 8.4, 7.3, 7.2, and 5.6 versions. For installing PHP on Debian 12 through the Sury PHP repository, use the following steps:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_jsy0bhd3302d\"><\/a>Step 1: Install Required Packages<\/h4>\n\n\n\n<p>For users to be able to install the PHP package from a third-party repository on Debian 12, they need to install the inadequate packages first:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo apt install apt-transport-https lsb-release ca-certificates wget<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1148\" height=\"735\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-12.png\" alt=\"sudo apt install apt-transport-https lsb-release ca-certificates wget\" class=\"wp-image-14234\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-12.png 1148w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-12-300x192.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-12-1024x656.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-12-768x492.png 768w\" sizes=\"(max-width: 1148px) 100vw, 1148px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_vadpwaovujmh\"><\/a>Step 2: Add the PPA Repository<\/h4>\n\n\n\n<p>Earlier Steps, explained how to install a package or add a repository and also access for Sury PHP repository to get the latest packages for PHP, do the following commands to add the repository:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>echo &#8220;deb https:\/\/packages.sury.org\/php\/ $(lsb_release -sc) main&#8221; | sudo tee \/etc\/apt\/sources.list.d\/sury-php.list <br><br>sudo wget -qO &#8211; https:\/\/packages.sury.org\/php\/apt.gpg | sudo gpg &#8211;no-default-keyring &#8211;keyring gnupg-ring:\/etc\/apt\/trusted.gpg.d\/debian-php-8.gpg &#8211;import <br><br>sudo chmod 644 \/etc\/apt\/trusted.gpg.d\/debian-php-8.gpg<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1153\" height=\"591\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-13.png\" alt=\"Add the PPA repository\" class=\"wp-image-14235\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-13.png 1153w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-13-300x154.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-13-1024x525.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-13-768x394.png 768w\" sizes=\"(max-width: 1153px) 100vw, 1153px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_xuscfk6w6y6a\"><\/a>Step 3: Update Debian Packages<\/h4>\n\n\n\n<p>Update the Debian packages first to be able to administer and install PHP packages from the repository added earlier:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo apt update<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1148\" height=\"459\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-14.png\" alt=\"sudo apt update\" class=\"wp-image-14236\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-14.png 1148w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-14-300x120.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-14-1024x409.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-14-768x307.png 768w\" sizes=\"(max-width: 1148px) 100vw, 1148px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_2rdi4yqn7xle\"><\/a>Step 4: Install PHP<\/h4>\n\n\n\n<p>At last, execute the command to install PHP 8.4, which is the latest version at the moment of writing, through the apt command:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><br><p>sudo apt install php8.4<\/p><br><\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1143\" height=\"524\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-15.png\" alt=\"sudo apt install php8.4\" class=\"wp-image-14237\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-15.png 1143w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-15-300x138.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-15-1024x469.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-15-768x352.png 768w\" sizes=\"(max-width: 1143px) 100vw, 1143px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-14222-_2xu3t01ns40p\"><\/a>Step 5: Verify PHP Installation<\/h4>\n\n\n\n<p>Using the command of the version utility, verify the installation and use it to display the version of PHP:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>php &#8211;version<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1141\" height=\"231\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-16.png\" alt=\"php --version\" class=\"wp-image-14238\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-16.png 1141w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-16-300x61.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-16-1024x207.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-16-768x155.png 768w\" sizes=\"(max-width: 1141px) 100vw, 1141px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Switch-Between-PHP-Versions-(if-Needed)\"><a id=\"post-14222-_4wpeya6isb7u\"><\/a>How to Switch Between PHP Versions (if Needed)<\/h2>\n\n\n\n<p>In the case that users have multiple installed PHP versions, you can change the desired version through the command <strong>update-alternatives <\/strong>as below:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo update-alternatives &#8211;config php<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1150\" height=\"364\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-17.png\" alt=\"sudo update-alternatives --config php\" class=\"wp-image-14239\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-17.png 1150w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-17-300x95.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-17-1024x324.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-17-768x243.png 768w\" sizes=\"(max-width: 1150px) 100vw, 1150px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>That is all of the steps from this guide.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Run-Execute-a-PHP-Script-on-Debian-12\"><a id=\"post-14222-_mvjap95dj2rf\"><\/a>How to Run\/Execute a PHP Script on Debian 12?<\/h2>\n\n\n\n<p>You need to procure a PHP interpreter along with a web server such as Apache or Nginx to execute a PHP script on Debian 12. For this purpose, both can be obtained by using the following commands:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo apt update <br>sudo apt install php libapache2-mod-php <br>sudo systemctl restart apache2<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>As a different route, you may utilize the built-in PHP web server for testing purposes:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>php -S localhost:8000<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1155\" height=\"166\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-18.png\" alt=\"Running a PHP script\" class=\"wp-image-14240\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-18.png 1155w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-18-300x43.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-18-1024x147.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-18-768x110.png 768w\" sizes=\"(max-width: 1155px) 100vw, 1155px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>To execute a PHP script on Debian 12 through a web server or from the command line, follow the next steps:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-14222-_v6z3a733a7fm\"><\/a>Step 1: Create a PHP File<\/h3>\n\n\n\n<p>To begin with, make sure you have PHP on the Debian 12 system. Then, enter any text editor of your choice, such as Nano, Vim, or gedit, to begin writing the code.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo nano greenwebpage.php<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>For example, write the following in a file \u201c<strong>greenwebpage.php<\/strong>\u201d:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>&lt;?php <\/p>\n<p>echo &#8220;Green Webpage is the best hosting provider website&#8221;; <\/p>\n<p>?&gt;<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>Press the combination of keys \u201c<strong>CTRL+C<\/strong>\u201d to save the .php document and to exit, or opt for the \u201c<strong>CTRL+X<\/strong>\u201d keys:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1130\" height=\"457\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-19.png\" alt=\"Creating a PHP file\" class=\"wp-image-14241\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-19.png 1130w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-19-300x121.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-19-1024x414.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-19-768x311.png 768w\" sizes=\"(max-width: 1130px) 100vw, 1130px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-14222-_m5ru8safmho4\"><\/a>Step 2: Run PHP Script<\/h3>\n\n\n\n<p>To run, type into the Terminal <strong>php greenwebpage.php<\/strong>. This will run the file called <strong>greenwebpage.php<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>php greenwebpage.php<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1141\" height=\"136\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-20.png\" alt=\"Running a PHP script\" class=\"wp-image-14242\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-20.png 1141w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-20-300x36.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-20-1024x122.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14222-20-768x92.png 768w\" sizes=\"(max-width: 1141px) 100vw, 1141px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The output of the script will be printed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Conclusion\"><a id=\"post-14222-_vly02o55it86\"><\/a>Conclusion<\/h2>\n\n\n\n<p>Using the official PHP website is one of the most efficient methods of installing PHP on Debian 12. To install PHP on this platform, first check that system packages are updated and then install the necessary dependencies. From there, you can add the official PHP repository to the sources list, import the GPG key, install the required version of PHP, and finally set the configurations and run the necessary tests to check for successful installation.<\/p>\n\n\n\n<p>Another method is to utilize the default package repositories, which would streamline the installation process, or even a third-party repository. The default ones do have PHP 8.4, but lack packages for PHP 8.2, 7.3, 7.2, and even 5.6. If users require any of those, they can just add the \u201cSury PHP repository,\u201d which is sure to have current packages.<\/p>\n\n\n\t\t\t\t\t\t\t<h3 style=\"margin-bottom:20px;display:block;width:100%;margin-top:10px\">Frequently Asked Questions <\/h3>\r\n\t\t\t\t\t\t<style>\r\n\t\t\t\t<style>\r\n#wpsm_accordion_14245 .wpsm_panel-heading{\r\n\tpadding:0px !important;\r\n}\r\n#wpsm_accordion_14245 .wpsm_panel-title {\r\n\tmargin:0px !important; \r\n\ttext-transform:none !important;\r\n\tline-height: 1 !important;\r\n}\r\n#wpsm_accordion_14245 .wpsm_panel-title a{\r\n\ttext-decoration:none;\r\n\toverflow:hidden;\r\n\tdisplay:block;\r\n\tpadding:0px;\r\n\tfont-size: 18px !important;\r\n\tfont-family: Open Sans !important;\r\n\tcolor:#000000 !important;\r\n\tborder-bottom:0px !important;\r\n}\r\n\r\n#wpsm_accordion_14245 .wpsm_panel-title a:focus {\r\noutline: 0px !important;\r\n}\r\n\r\n#wpsm_accordion_14245 .wpsm_panel-title a:hover, #wpsm_accordion_14245 .wpsm_panel-title a:focus {\r\n\tcolor:#000000 !important;\r\n}\r\n#wpsm_accordion_14245 .acc-a{\r\n\tcolor: #000000 !important;\r\n\tbackground-color:#e8e8e8 !important;\r\n\tborder-color: #ddd;\r\n}\r\n#wpsm_accordion_14245 .wpsm_panel-default > .wpsm_panel-heading{\r\n\tcolor: #000000 !important;\r\n\tbackground-color: #e8e8e8 !important;\r\n\tborder-color: #e8e8e8 !important;\r\n\tborder-top-left-radius: 0px;\r\n\tborder-top-right-radius: 0px;\r\n}\r\n#wpsm_accordion_14245 .wpsm_panel-default {\r\n\t\tborder:1px solid transparent !important;\r\n\t}\r\n#wpsm_accordion_14245 {\r\n\tmargin-bottom: 20px;\r\n\toverflow: hidden;\r\n\tfloat: none;\r\n\twidth: 100%;\r\n\tdisplay: block;\r\n}\r\n#wpsm_accordion_14245 .ac_title_class{\r\n\tdisplay: block;\r\n\tpadding-top: 12px;\r\n\tpadding-bottom: 12px;\r\n\tpadding-left: 15px;\r\n\tpadding-right: 15px;\r\n}\r\n#wpsm_accordion_14245  .wpsm_panel {\r\n\toverflow:hidden;\r\n\t-webkit-box-shadow: 0 0px 0px rgba(0, 0, 0, .05);\r\n\tbox-shadow: 0 0px 0px rgba(0, 0, 0, .05);\r\n\t\tborder-radius: 4px;\r\n\t}\r\n#wpsm_accordion_14245  .wpsm_panel + .wpsm_panel {\r\n\t\tmargin-top: 5px;\r\n\t}\r\n#wpsm_accordion_14245  .wpsm_panel-body{\r\n\tbackground-color:#ffffff !important;\r\n\tcolor:#000000 !important;\r\n\tborder-top-color: #e8e8e8 !important;\r\n\tfont-size:16px !important;\r\n\tfont-family: Open Sans !important;\r\n\toverflow: hidden;\r\n\t\tborder: 2px solid #e8e8e8 !important;\r\n\t}\r\n\r\n#wpsm_accordion_14245 .ac_open_cl_icon{\r\n\tbackground-color:#e8e8e8 !important;\r\n\tcolor: #000000 !important;\r\n\tfloat:right !important;\r\n\tpadding-top: 12px !important;\r\n\tpadding-bottom: 12px !important;\r\n\tline-height: 1.0 !important;\r\n\tpadding-left: 15px !important;\r\n\tpadding-right: 15px !important;\r\n\tdisplay: inline-block !important;\r\n}\r\n\r\n\t\t\t\r\n\t\t\t<\/style>\t\r\n\t\t\t<\/style>\r\n\t\t\t<div class=\"wpsm_panel-group\" id=\"wpsm_accordion_14245\" >\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_14245 \" href=\"javascript:void(0)\" data-target=\"#ac_14245_collapse1\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow do I install PHP on Debian 12?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_14245_collapse1\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tRun <code>sudo apt update &amp;&amp; sudo apt install php<\/code> to install the default PHP version available in the Debian repositories.\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"collapsed\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_14245 \" href=\"javascript:void(0)\" data-target=\"#ac_14245_collapse2\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow can I check the installed PHP version?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_14245_collapse2\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tUse the command <code>php -v<\/code> to display the current PHP version installed on your system.\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"collapsed\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_14245 \" href=\"javascript:void(0)\" data-target=\"#ac_14245_collapse3\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow do I install specific PHP versions (e.g., PHP 8.2)?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_14245_collapse3\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tAdd the SURY repository, then run <code>sudo apt install php8.2<\/code>. This lets you install newer or alternative versions.\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"collapsed\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_14245 \" href=\"javascript:void(0)\" data-target=\"#ac_14245_collapse4\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tWhere is the PHP configuration file located?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_14245_collapse4\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tThe main <code>php.ini<\/code> file is typically located at <code>\/etc\/php\/\/apache2\/php.ini<\/code> for Apache or <code>\/etc\/php\/\/cli\/php.ini<\/code> for CLI.\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"collapsed\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_14245 \" href=\"javascript:void(0)\" data-target=\"#ac_14245_collapse5\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow do I install common PHP extensions?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_14245_collapse5\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tUse <code>sudo apt install php-<\/code> (e.g., <code>php-mysql<\/code>, <code>php-curl<\/code>, <code>php-gd<\/code>) to install needed extensions.\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\r\n<script type=\"text\/javascript\">\r\n\t\r\n\t\tfunction do_resize(){\r\n\r\n\t\t\tvar width=jQuery( '.wpsm_panel .wpsm_panel-body iframe' ).width();\r\n\t\t\tvar height=jQuery( '.wpsm_panel .wpsm_panel-body iframe' ).height();\r\n\r\n\t\t\tvar toggleSize = true;\r\n\t\t\tjQuery('iframe').animate({\r\n\t\t\t    width: toggleSize ? width : 640,\r\n\t\t\t    height: toggleSize ? height : 360\r\n\t\t\t  }, 250);\r\n\r\n\t\t\t  toggleSize = !toggleSize;\r\n\t\t}\r\n\t\t\r\n<\/script>\t\n\n\n\n<p><\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>Linux, Windows, and Mac OS are among the many platforms on which PHP can run. PHP is compatible with a variety of databases and web servers, including MySQL, PostgreSQL, Apache, and NGINX. If you wish to set up a web server or start building online apps, installing PHP on Debian 12 offers several benefits. It [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":14248,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[297,318,350],"class_list":["post-14222","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-debian-12","tag-php","tag-web-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install PHP on Debian 12<\/title>\n<meta name=\"description\" content=\"In this article, I&#039;ll show you how to install and properly configure PHP on Debian 12. Learn more!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install PHP on Debian 12\" \/>\n<meta property=\"og:description\" content=\"In this article, I&#039;ll show you how to install and properly configure PHP on Debian 12. Learn more!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-13T14:02:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-13T14:02:24+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/Install-PHP-on-Debian-12.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Install PHP on Debian 12\",\"datePublished\":\"2025-05-13T14:02:23+00:00\",\"dateModified\":\"2025-05-13T14:02:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/\"},\"wordCount\":1348,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/Install-PHP-on-Debian-12.jpg\",\"keywords\":[\"Debian 12\",\"PHP\",\"Web Development\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/\",\"name\":\"How to Install PHP on Debian 12\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/Install-PHP-on-Debian-12.jpg\",\"datePublished\":\"2025-05-13T14:02:23+00:00\",\"dateModified\":\"2025-05-13T14:02:24+00:00\",\"description\":\"In this article, I'll show you how to install and properly configure PHP on Debian 12. Learn more!\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/Install-PHP-on-Debian-12.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/Install-PHP-on-Debian-12.jpg\",\"width\":1020,\"height\":600,\"caption\":\"Install PHP on Debian 12\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install PHP on Debian 12\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install PHP on Debian 12","description":"In this article, I'll show you how to install and properly configure PHP on Debian 12. Learn more!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/","og_locale":"en_US","og_type":"article","og_title":"How to Install PHP on Debian 12","og_description":"In this article, I'll show you how to install and properly configure PHP on Debian 12. Learn more!","og_url":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/","og_site_name":"Greenwebpage Community","article_published_time":"2025-05-13T14:02:23+00:00","article_modified_time":"2025-05-13T14:02:24+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/Install-PHP-on-Debian-12.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Install PHP on Debian 12","datePublished":"2025-05-13T14:02:23+00:00","dateModified":"2025-05-13T14:02:24+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/"},"wordCount":1348,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/Install-PHP-on-Debian-12.jpg","keywords":["Debian 12","PHP","Web Development"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/","url":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/","name":"How to Install PHP on Debian 12","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/Install-PHP-on-Debian-12.jpg","datePublished":"2025-05-13T14:02:23+00:00","dateModified":"2025-05-13T14:02:24+00:00","description":"In this article, I'll show you how to install and properly configure PHP on Debian 12. Learn more!","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/Install-PHP-on-Debian-12.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/Install-PHP-on-Debian-12.jpg","width":1020,"height":600,"caption":"Install PHP on Debian 12"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Install PHP on Debian 12"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/14222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=14222"}],"version-history":[{"count":3,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/14222\/revisions"}],"predecessor-version":[{"id":14247,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/14222\/revisions\/14247"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/14248"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=14222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=14222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=14222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}