{"id":14328,"date":"2019-03-02T05:31:24","date_gmt":"2019-03-02T10:31:24","guid":{"rendered":"https:\/\/www.techwalls.com\/?p=14328"},"modified":"2019-08-07T03:09:08","modified_gmt":"2019-08-07T07:09:08","slug":"php-update-required-wordpress-fix-digitalocean","status":"publish","type":"post","link":"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/","title":{"rendered":"PHP Update Required in WordPress &#8211; How to Fix It on DigitalOcean?"},"content":{"rendered":"\n<p>After upgrading WordPress to the latest version 5.1, I saw a warning in the Dashboard saying: &#8220;<em>PHP Update Required, WordPress has detected that your site is running on an insecure version of PHP<\/em>&#8220;.<\/p>\n\n\n\n<!--more-->\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress-1024x524.jpg\" alt=\"\" class=\"wp-image-14390\" width=\"753\" height=\"385\" srcset=\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress-1024x524.jpg 1024w, https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress-300x153.jpg 300w, https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress-768x393.jpg 768w, https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress.jpg 1400w\" sizes=\"auto, (max-width: 753px) 100vw, 753px\" \/><\/a><\/figure>\n\n\n\n<p>PHP is the coding language of WordPress and they always recommend us to update it to the newest version to ensure the speed and security of our websites. I almost forgot about it until seeing that reminder. My Ubuntu server on DigitalOcean ran on PHP 5 and I didn&#8217;t update it for years. When I checked on my server, the current PHP version was 7.3 and therefore, the update must be done as soon as possible.<\/p>\n\n\n\n<p>In case you are using shared hosting services, you can go to <em>PHP Selector<\/em> in cPanel to set up your PHP environment. If you are using the service from DigitalOcean or running a Ubuntu server, you can follow the guide to update your PHP version.<\/p>\n\n\n\n<p><strong>1. Back up your Websites<\/strong>: Make a backup of your websites or server before updating PHP version. Although there is little risk during the process, making a backup is still recommended.<\/p>\n\n\n\n<p><strong>2. Log on to your Ubuntu server<\/strong><\/p>\n\n\n\n<p><strong>3. Check your current PHP version:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-verse\">$ php -v<\/pre>\n\n\n\n<p><strong>3. Add a PPA for PHP 7.3 Packages:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-verse\">$ sudo add-apt-repository ppa:ondrej\/php<br>$ sudo apt-get update<\/pre>\n\n\n\n<p><strong>4. Implement the upgrade:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-verse\">$ sudo apt-get install php7.3<br>$ sudo apt-get install php7.3-mysql<br><\/pre>\n\n\n\n<p>You can check your PHP version again to make sure the PHP has been updated on your server. Then, proceed to install related modules.<\/p>\n\n\n\n<pre class=\"wp-block-verse\">sudo apt install php7.3-fpm php7.3-common php7.3-mbstring php7.3-xmlrpc php7.3-gd php7.3-xml php7.3-mysql php7.3-cli php7.3-zip php7.3-curl<\/pre>\n\n\n\n<p><strong>5. Disable PHP5 and enable PHP7<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-verse\">$ sudo a2dismod php5<br>$ sudo a2enmod php7.3<br>$ sudo service apache2 restart<\/pre>\n\n\n\n<p>All done, your WordPress websites should be running on the newest PHP version now and you won&#8217;t see the warning again in the Dashboard. The PHP update is really important and I highly recommend you to do it immediately if you haven&#8217;t done so. It does not only make your site faster for search engines and for your visitors, but also make your website better protected against hackers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After upgrading WordPress to the latest version 5.1, I saw a warning in the Dashboard saying: &#8220;PHP Update Required, WordPress has detected that your site is running on an insecure version of PHP&#8220;.<\/p>\n","protected":false},"author":42,"featured_media":14390,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[1146],"tags":[1147,1382,28],"class_list":{"0":"post-14328","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-guide","8":"tag-guide-2","9":"tag-web","10":"tag-wordpress","11":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP Update Required in Wordpress - How to Fix It on DigitalOcean? - TechWalls<\/title>\n<meta name=\"description\" content=\"After upgrading Wordpress to the latest version, I saw a warning in the Dashboard saying: &quot;PHP Update Required, Wordpress has detected that your site is running on an insecure version of PHP&quot;.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tuan Do\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/\",\"url\":\"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/\",\"name\":\"PHP Update Required in Wordpress - How to Fix It on DigitalOcean? - TechWalls\",\"isPartOf\":{\"@id\":\"https:\/\/www.techwalls.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress.jpg\",\"datePublished\":\"2019-03-02T10:31:24+00:00\",\"dateModified\":\"2019-08-07T07:09:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.techwalls.com\/#\/schema\/person\/8e0374331f6dab83e97eb683907dca90\"},\"description\":\"After upgrading Wordpress to the latest version, I saw a warning in the Dashboard saying: \\\"PHP Update Required, Wordpress has detected that your site is running on an insecure version of PHP\\\".\",\"breadcrumb\":{\"@id\":\"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/#primaryimage\",\"url\":\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress.jpg\",\"contentUrl\":\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress.jpg\",\"width\":1400,\"height\":716},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.techwalls.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tech Guide\",\"item\":\"https:\/\/www.techwalls.com\/guide\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"PHP Update Required in WordPress &#8211; How to Fix It on DigitalOcean?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.techwalls.com\/#website\",\"url\":\"https:\/\/www.techwalls.com\/\",\"name\":\"TechWalls\",\"description\":\"Technology News | Gadget Reviews | Tutorials\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.techwalls.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.techwalls.com\/#\/schema\/person\/8e0374331f6dab83e97eb683907dca90\",\"name\":\"Tuan Do\",\"description\":\"I am the founder and editor of TechWalls technology blog. I have been blogging for 8 years and here you can find latest technology news, gadgets, tutorials and product reviews.\",\"url\":\"https:\/\/www.techwalls.com\/author\/rickyadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP Update Required in Wordpress - How to Fix It on DigitalOcean? - TechWalls","description":"After upgrading Wordpress to the latest version, I saw a warning in the Dashboard saying: \"PHP Update Required, Wordpress has detected that your site is running on an insecure version of PHP\".","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:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/","twitter_misc":{"Written by":"Tuan Do","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/","url":"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/","name":"PHP Update Required in Wordpress - How to Fix It on DigitalOcean? - TechWalls","isPartOf":{"@id":"https:\/\/www.techwalls.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/#primaryimage"},"image":{"@id":"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/#primaryimage"},"thumbnailUrl":"https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress.jpg","datePublished":"2019-03-02T10:31:24+00:00","dateModified":"2019-08-07T07:09:08+00:00","author":{"@id":"https:\/\/www.techwalls.com\/#\/schema\/person\/8e0374331f6dab83e97eb683907dca90"},"description":"After upgrading Wordpress to the latest version, I saw a warning in the Dashboard saying: \"PHP Update Required, Wordpress has detected that your site is running on an insecure version of PHP\".","breadcrumb":{"@id":"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/#primaryimage","url":"https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress.jpg","contentUrl":"https:\/\/www.techwalls.com\/wp-content\/uploads\/2019\/03\/php-update-required-wordpress.jpg","width":1400,"height":716},{"@type":"BreadcrumbList","@id":"https:\/\/www.techwalls.com\/php-update-required-wordpress-fix-digitalocean\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.techwalls.com\/"},{"@type":"ListItem","position":2,"name":"Tech Guide","item":"https:\/\/www.techwalls.com\/guide\/"},{"@type":"ListItem","position":3,"name":"PHP Update Required in WordPress &#8211; How to Fix It on DigitalOcean?"}]},{"@type":"WebSite","@id":"https:\/\/www.techwalls.com\/#website","url":"https:\/\/www.techwalls.com\/","name":"TechWalls","description":"Technology News | Gadget Reviews | Tutorials","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.techwalls.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.techwalls.com\/#\/schema\/person\/8e0374331f6dab83e97eb683907dca90","name":"Tuan Do","description":"I am the founder and editor of TechWalls technology blog. I have been blogging for 8 years and here you can find latest technology news, gadgets, tutorials and product reviews.","url":"https:\/\/www.techwalls.com\/author\/rickyadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/posts\/14328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/comments?post=14328"}],"version-history":[{"count":0,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/posts\/14328\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/media\/14390"}],"wp:attachment":[{"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/media?parent=14328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/categories?post=14328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/tags?post=14328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}