{"id":221,"date":"2025-08-01T14:05:51","date_gmt":"2025-08-01T14:05:51","guid":{"rendered":"http:\/\/123.249.119.122\/Wordpress\/?p=221"},"modified":"2025-08-01T14:05:51","modified_gmt":"2025-08-01T14:05:51","slug":"the-update-of-php","status":"publish","type":"post","link":"http:\/\/123.249.119.122\/Wordpress\/index.php\/2025\/08\/01\/the-update-of-php\/","title":{"rendered":"The Update of PHP"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The LAMP enviorment and the wordpress website consists of 4 parts:Linux operating system,Apache(httpd) webserver,Mysql database language,Php(or Python) language.If the Php version is outdated,you can update your Php version.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"340\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/07\/image.png\" alt=\"\" class=\"wp-image-222\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/07\/image.png 650w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/07\/image-300x157.png 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">1.Check your Php verison.Input &#8216;<strong>php -v<\/strong>&#8216;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2.If the Php version is outdated,input &#8216;<strong>dnf update -y php<\/strong>&#8216; to update Php version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before the updation,you can input &#8216;<strong>dnf list |grep php<\/strong>&#8216; to check the version of Php installation package.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the update completed,input &#8216;<strong>php -v<\/strong>&#8216; to check the new version of Php.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"693\" height=\"384\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/07\/image-2.png\" alt=\"\" class=\"wp-image-225\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/07\/image-2.png 693w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/07\/image-2-300x166.png 300w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3.If the version is outdated,change the new yum source in the directory &#8216;<strong>\/etc\/yum.repos.d<\/strong>&#8216;.You can move the old repository to avoid the conflict of yum source.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"383\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/08\/image-1024x383.png\" alt=\"\" class=\"wp-image-231\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/08\/image-1024x383.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/08\/image-300x112.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/08\/image-768x287.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/08\/image.png 1332w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And input &#8216;<strong>dnf list |grep php<\/strong>&#8216; to check the new version of Php.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"216\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/07\/image-3.png\" alt=\"\" class=\"wp-image-229\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/07\/image-3.png 692w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/07\/image-3-300x94.png 300w\" sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">4.Stop the web server(Apache,Nginx) before update.Input &#8216;<strong>systemctl stop httpd(nginx)<\/strong>&#8216; to stop the web service.Then,input &#8216;<strong>dnf update -y php<\/strong>&#8216; to update the Php version.After the updating,input &#8216;<strong>systemctl restart httpd(nginx)<\/strong>&#8216; to restart the web service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5.Finally,when the update completed,you can input <strong>&#8216;php -v<\/strong>&#8216; to check the new version.And visit the IP Address:Port(or Domain Name:port),if the website is not accessible,rollback the version.Input &#8216;<strong>dnf remove -y php*<\/strong>&#8216; to uninstall Php.Change the old yum source in the directory &#8216;<strong>\/etc\/yum.repos.d<\/strong>&#8216;,and input &#8216;<strong>dnf install -y php<\/strong>&#8216; to rollback.Finally,the website is accessible.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The LAMP enviorment and the wordpress website consists of 4 parts:Linux operating system,Apache(httpd) webserver,Mysql database language,Php(or Python) language.If the Php version is outdated,you can update your Php version. 1.Check your Php verison.Input &#8216;php -v&#8216;. 2.If the Php version is outdated,input &#8216;dnf update -y php&#8216; to update Php version. Before the updation,you can input &#8216;dnf list [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=221"}],"version-history":[{"count":7,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":233,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/221\/revisions\/233"}],"wp:attachment":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}