{"id":8879,"date":"2023-08-13T17:29:14","date_gmt":"2023-08-13T17:29:14","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=8879"},"modified":"2023-08-13T17:29:14","modified_gmt":"2023-08-13T17:29:14","slug":"backup-wordpress-html-files-and-database-with-timestamp","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2023\/08\/13\/backup-wordpress-html-files-and-database-with-timestamp\/","title":{"rendered":"Backup WordPress HTML files and Database with Timestamp"},"content":{"rendered":"\n<p>How to backup database and files for WordPress is easy with the commands below.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$ cd \/home\/user\/html\n<\/pre><\/div>\n\n\n<p>Backup the database with wp<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$ wp db export\nSuccess: Exported to &#039;a51c5fbc_import-2023-08-13-2dceb88.sql&#039;.\n<\/pre><\/div>\n\n\n<p>cd ..<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntar -czf html-backup-$(date +%F).tar.gz html\n<\/pre><\/div>\n\n\n<p>Now you have a timestamped backup of wordpress with the database<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nls -lah html-backup-2023-08-13.tar.gz \n-rw-rw-r-- 1 a51c5fbc a51c5fbc 67M Aug 13 17:25 html-backup-2023-08-13.tar.gz\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>How to backup database and files for WordPress is easy with the commands below. Backup the database with wp cd .. Now you have a timestamped backup of wordpress with the database<\/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-8879","post","type-post","status-publish","format-standard","hentry","category-administration"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/8879","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=8879"}],"version-history":[{"count":1,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/8879\/revisions"}],"predecessor-version":[{"id":8880,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/8879\/revisions\/8880"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=8879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=8879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=8879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}