{"id":17515,"date":"2019-06-05T19:00:31","date_gmt":"2019-06-05T23:00:31","guid":{"rendered":"https:\/\/www.boldgrid.com\/support\/?p=17515"},"modified":"2021-04-27T12:15:28","modified_gmt":"2021-04-27T16:15:28","slug":"checking-your-wordpress-core-files-with-wp-cli","status":"publish","type":"post","link":"https:\/\/www.boldgrid.com\/support\/wordpress-tutorials\/checking-your-wordpress-core-files-with-wp-cli\/","title":{"rendered":"Checking Your WordPress Core Files with WP-CLI"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<?xml encoding=\"utf-8\" ?><html><body><p>If you are <a href=\"\/support\/total-upkeep\/site-check-fails\/\">troubleshooting a WordPress fatal error<\/a>, and you need to make sure that your WordPress Core files have not been modified, you can use these steps to ensure that you have the right code running your WordPress website.<\/p>\n<ol>\n<li><strong>SSH into your server<\/strong> using your Web Host&rsquo;s instructions for doing so. Not all <a href=\"\/wordpress-hosting\/\">WordPress hosting<\/a> includes ssh access, you&rsquo;ll have to contact your host to find out whether or not they do.<\/li>\n<li><strong>Change directories<\/strong>&nbsp;to the root directory containing your WordPress installation. In these examples, the directory&nbsp;<strong>~\/public_html<\/strong>&nbsp;is used in place of the root directory for WordPress.\n<pre>user@wordpress [~]$ cd ~\/public_html\/<\/pre>\n<\/li>\n<li><strong>Check your WordPress Version<\/strong> using the command&nbsp;<strong>wp core version:<\/strong>\n<pre>user@wordpress [~\/public_html]$ wp core version\r\n5.2.1<\/pre>\n<\/li>\n<li><strong>Check your WordPress Core files&nbsp;<\/strong>using the command&nbsp;<strong>wp core verify-checksums:<\/strong>\n<pre>user@wordpress [~\/public_html]$ wp core verify-checksums\r\nSuccess: WordPress installation verifies against checksums.<\/pre>\n<\/li>\n<li><strong>Examine the output from the command.<\/strong> Some warnings are OK, such as warnings indicating that an error log should not be present.&nbsp;<strong>If core files do not match checksums<\/strong>, you may need to replace your core files, or&nbsp;<strong>restore a backup.<\/strong><\/li>\n<li><strong>Replace your core files.&nbsp;<\/strong><em>Please note, if you have modified WordPress deliberately, this step will destroy any changes you have made. Proceed with this step at your own risk. <\/em>Use the command&nbsp;<strong>wp core download &ndash;version=5.2.1<\/strong> <strong>&ndash;force <\/strong>where &ldquo;5.2.1&rdquo; is replaced with the <strong>version number you found in step 3.<\/strong>\n<pre>user@wordpress [~\/public_html]$ wp core download --version=5.2.1 --force\r\nDownloading WordPress 5.2.1 (en_US)...\r\nmd5 hash verified: aa13bf5f99e05fe8ab24940b382f2e3f\r\nSuccess: WordPress downloaded.<\/pre>\n<\/li>\n<\/ol>\n<p>Congratulations! You now know how to verify your WordPress Core Files, and replace them if needed, using WP-CLI.<\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>If you are troubleshooting a WordPress fatal error, and you need to make sure that your WordPress Core files have not been modified, you can use these steps to ensure that you have the right code running your WordPress website. SSH into your server using your Web Host&rsquo;s instructions for doing so. Not all WordPress [&hellip;]<\/p>\n","protected":false},"author":1294,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[151],"tags":[661],"class_list":["post-17515","post","type-post","status-publish","format-standard","hentry","category-wordpress-tutorials","tag-wordpress-tutorial","experience-level-advanced"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/17515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/users\/1294"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/comments?post=17515"}],"version-history":[{"count":10,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/17515\/revisions"}],"predecessor-version":[{"id":36823,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/17515\/revisions\/36823"}],"wp:attachment":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/media?parent=17515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/categories?post=17515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/tags?post=17515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}