{"id":482,"date":"2022-06-25T22:28:19","date_gmt":"2022-06-26T05:28:19","guid":{"rendered":"https:\/\/liangqi.org\/?p=482"},"modified":"2023-01-21T11:30:54","modified_gmt":"2023-01-21T19:30:54","slug":"after-upgrading-ubuntu-workpress-stopped-working","status":"publish","type":"post","link":"https:\/\/liangqi.org\/?p=482","title":{"rendered":"After upgrading Ubuntu Workpress stopped working"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">The reason is php got updated to 8.\n<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>You will get:\n`Your PHP installation appears to be missing the MySQL extension which Is required by WordPress`<\/code><\/pre>\n\n\n\n<p>Just do:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>apt-get install php8.0-mysql<\/p>\n<\/blockquote>\n\n\n\n<p>And restart your apache<\/p>\n\n\n\n<p>sudo service apache2 restart<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Update on Jan 21, 2023<\/p>\n\n\n\n<p>after upgrading to Ubuntu 22.04, all php shows source code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/apache2\nls -l mods-*\/*php*\n\n-rw-r--r-- 1 root root 855 Nov 25  2021 mods-available\/php7.4.conf\n-rw-r--r-- 1 root root 102 Nov 25  2021 mods-available\/php7.4.load\n-rw-r--r-- 1 root root 855 Oct 19 07:58 mods-available\/php8.1.conf\n-rw-r--r-- 1 root root 101 Oct 19 07:58 mods-available\/php8.1.load\n\n\nsudo apt-get install apache2 php8.1 libapache2-mod-php8.1\na2query -m php8.1\nsudo a2enmod php8.1\nsudo service apache2 restart<\/code><\/pre>\n\n\n\n<p>Then showing &#8220;`Your PHP installation appears to be missing the MySQL extension which Is required by WordPress`&#8221; again:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get install php8.1-mysqlnd\nsudo service apache2 restart<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The reason is php got updated to 8. Just do: apt-get install php8.0-mysql And restart your apache sudo service apache2 restart Update on Jan 21, 2023 after upgrading to Ubuntu 22.04, all php shows source code: Then showing &#8220;`Your PHP installation appears to be missing the MySQL extension which Is required by WordPress`&#8221; again:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,38],"tags":[],"class_list":["post-482","post","type-post","status-publish","format-standard","hentry","category-16","category-38"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>After upgrading Ubuntu Workpress stopped working - Liangqi\u2018s Technical Journey<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/liangqi.org\/?p=482\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"After upgrading Ubuntu Workpress stopped working - Liangqi\u2018s Technical Journey\" \/>\n<meta property=\"og:description\" content=\"The reason is php got updated to 8. Just do: apt-get install php8.0-mysql And restart your apache sudo service apache2 restart Update on Jan 21, 2023 after upgrading to Ubuntu 22.04, all php shows source code: Then showing &#8220;`Your PHP installation appears to be missing the MySQL extension which Is required by WordPress`&#8221; again:\" \/>\n<meta property=\"og:url\" content=\"https:\/\/liangqi.org\/?p=482\" \/>\n<meta property=\"og:site_name\" content=\"Liangqi\u2018s Technical Journey\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-26T05:28:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-21T19:30:54+00:00\" \/>\n<meta name=\"author\" content=\"liangqi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"liangqi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/liangqi.org\/?p=482#article\",\"isPartOf\":{\"@id\":\"https:\/\/liangqi.org\/?p=482\"},\"author\":{\"name\":\"liangqi\",\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"headline\":\"After upgrading Ubuntu Workpress stopped working\",\"datePublished\":\"2022-06-26T05:28:19+00:00\",\"dateModified\":\"2023-01-21T19:30:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/liangqi.org\/?p=482\"},\"wordCount\":50,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"articleSection\":[\"\u6280\u672f\",\"\u7f51\u7ad9\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/liangqi.org\/?p=482#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/liangqi.org\/?p=482\",\"url\":\"https:\/\/liangqi.org\/?p=482\",\"name\":\"After upgrading Ubuntu Workpress stopped working - Liangqi\u2018s Technical Journey\",\"isPartOf\":{\"@id\":\"https:\/\/liangqi.org\/#website\"},\"datePublished\":\"2022-06-26T05:28:19+00:00\",\"dateModified\":\"2023-01-21T19:30:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/liangqi.org\/?p=482#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/liangqi.org\/?p=482\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/liangqi.org\/?p=482#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/liangqi.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"After upgrading Ubuntu Workpress stopped working\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/liangqi.org\/#website\",\"url\":\"https:\/\/liangqi.org\/\",\"name\":\"Liangqi\u2018s Technical Journey\",\"description\":\"Chasing Excellence; Enjoy life.\",\"publisher\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/liangqi.org\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\",\"name\":\"liangqi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg\",\"contentUrl\":\"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg\",\"width\":2560,\"height\":1920,\"caption\":\"liangqi\"},\"logo\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/liangqi.org\"],\"url\":\"https:\/\/liangqi.org\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"After upgrading Ubuntu Workpress stopped working - Liangqi\u2018s Technical Journey","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:\/\/liangqi.org\/?p=482","og_locale":"en_US","og_type":"article","og_title":"After upgrading Ubuntu Workpress stopped working - Liangqi\u2018s Technical Journey","og_description":"The reason is php got updated to 8. Just do: apt-get install php8.0-mysql And restart your apache sudo service apache2 restart Update on Jan 21, 2023 after upgrading to Ubuntu 22.04, all php shows source code: Then showing &#8220;`Your PHP installation appears to be missing the MySQL extension which Is required by WordPress`&#8221; again:","og_url":"https:\/\/liangqi.org\/?p=482","og_site_name":"Liangqi\u2018s Technical Journey","article_published_time":"2022-06-26T05:28:19+00:00","article_modified_time":"2023-01-21T19:30:54+00:00","author":"liangqi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"liangqi","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/liangqi.org\/?p=482#article","isPartOf":{"@id":"https:\/\/liangqi.org\/?p=482"},"author":{"name":"liangqi","@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"headline":"After upgrading Ubuntu Workpress stopped working","datePublished":"2022-06-26T05:28:19+00:00","dateModified":"2023-01-21T19:30:54+00:00","mainEntityOfPage":{"@id":"https:\/\/liangqi.org\/?p=482"},"wordCount":50,"commentCount":0,"publisher":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"articleSection":["\u6280\u672f","\u7f51\u7ad9"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/liangqi.org\/?p=482#respond"]}]},{"@type":"WebPage","@id":"https:\/\/liangqi.org\/?p=482","url":"https:\/\/liangqi.org\/?p=482","name":"After upgrading Ubuntu Workpress stopped working - Liangqi\u2018s Technical Journey","isPartOf":{"@id":"https:\/\/liangqi.org\/#website"},"datePublished":"2022-06-26T05:28:19+00:00","dateModified":"2023-01-21T19:30:54+00:00","breadcrumb":{"@id":"https:\/\/liangqi.org\/?p=482#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/liangqi.org\/?p=482"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/liangqi.org\/?p=482#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/liangqi.org\/"},{"@type":"ListItem","position":2,"name":"After upgrading Ubuntu Workpress stopped working"}]},{"@type":"WebSite","@id":"https:\/\/liangqi.org\/#website","url":"https:\/\/liangqi.org\/","name":"Liangqi\u2018s Technical Journey","description":"Chasing Excellence; Enjoy life.","publisher":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/liangqi.org\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3","name":"liangqi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/liangqi.org\/#\/schema\/person\/image\/","url":"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg","contentUrl":"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg","width":2560,"height":1920,"caption":"liangqi"},"logo":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/liangqi.org"],"url":"https:\/\/liangqi.org\/?author=1"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=482"}],"version-history":[{"count":3,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/482\/revisions"}],"predecessor-version":[{"id":616,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/482\/revisions\/616"}],"wp:attachment":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}