{"id":8884,"date":"2023-08-13T17:45:39","date_gmt":"2023-08-13T17:45:39","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=8884"},"modified":"2023-08-13T17:45:39","modified_gmt":"2023-08-13T17:45:39","slug":"replace-wordpress-with-a-know-good-copy","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2023\/08\/13\/replace-wordpress-with-a-know-good-copy\/","title":{"rendered":"Replace WordPress with a Know Good Copy"},"content":{"rendered":"\n<p>Here is a way to replace wordpress files with known good copies.<\/p>\n\n\n\n<p>Download WordPress files from GitHub repository<\/p>\n\n\n\n<p>The wp-content folder and the wp-config.php file are the only unique items in wordpress. (with the exception of domain verification files.) It contains media, plugins, and themes. Download a fresh copy of the WordPress files from the GitHub repository.<\/p>\n\n\n\n<p>Download files<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ngit clone https:\/\/github.com\/WordPress\/WordPress\n<\/pre><\/div>\n\n\n<p>Remove the wp-content directory from the WordPress directory<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nrm -rf WordPress\/wp-content\n<\/pre><\/div>\n\n\n<p>Copy the wp-config.php file from html directory to the new WordPress directory<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ncp -a html\/wp-config.php WordPress\/\n<\/pre><\/div>\n\n\n<p>Copy the wp-contents dir from the html directory to the new WordPress directory<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ncp -a html\/wp-content WordPress\/\n<\/pre><\/div>\n\n\n<p>Swap the html directory with the WordPress directory<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nmv html html.old; mv WordPress html\n<\/pre><\/div>\n\n\n<p>Update permissions on new html directory<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ncd html; nkwordpress -op .\n<\/pre><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a way to replace wordpress files with known good copies. Download WordPress files from GitHub repository The wp-content folder and the wp-config.php file are the only unique items in wordpress. (with the exception of domain verification files.) It contains media, plugins, and themes. Download a fresh copy of the WordPress files from the &#8230; <a title=\"Replace WordPress with a Know Good Copy\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2023\/08\/13\/replace-wordpress-with-a-know-good-copy\/\" aria-label=\"Read more about Replace WordPress with a Know Good Copy\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-8884","post","type-post","status-publish","format-standard","hentry","category-administration"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/8884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=8884"}],"version-history":[{"count":1,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/8884\/revisions"}],"predecessor-version":[{"id":8885,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/8884\/revisions\/8885"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=8884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=8884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=8884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}