{"id":1300,"date":"2012-11-27T16:16:00","date_gmt":"2012-11-28T00:16:00","guid":{"rendered":"http:\/\/www.codebelay.com\/blog\/?p=1300"},"modified":"2019-10-29T16:26:57","modified_gmt":"2019-10-29T22:26:57","slug":"how-to-back-up-wordpress-with-mysqldump","status":"publish","type":"post","link":"https:\/\/www.codebelay.com\/blog\/2012\/11\/27\/how-to-back-up-wordpress-with-mysqldump\/","title":{"rendered":"How To Back Up WordPress with mysqldump"},"content":{"rendered":"<p>Here&#8217;s a quick how to:<\/p>\n<p>1. Tar up the directory:<br \/>\n<code><br \/>\ntar cvf WordPress.tar wordpress\/.<br \/>\nbzip2 WordPress.tar<br \/>\n<\/code><\/p>\n<p>2. Dump the database.<br \/>\n<code><br \/>\nmysqldump --user user_name --password --host example.com --extended-insert=FALSE database_name &gt; database_name.sql<br \/>\n<\/code><\/p>\n<p>I personally use extended-insert set to false because I often have to read the SQL.<\/p>\n<p>Here is how to restore from backup:<\/p>\n<p><code><br \/>\ntar zxvf WordPress.tar.bz<br \/>\nmysql --user user_name -p -hexample.com database_name &lt; database_name.sql<br \/>\n<\/code><\/p>\n<p>Be sure to replace user_name, example.com and database_name with the appropriate values for your system.<\/p>\n<p>I hope this helps.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a quick how to: 1. Tar up the directory: tar cvf WordPress.tar wordpress\/. bzip2 WordPress.tar 2. Dump the database. mysqldump &#8211;user user_name &#8211;password &#8211;host example.com &#8211;extended-insert=FALSE database_name &gt; database_name.sql I personally use extended-insert set to false because I often have to read the SQL. Here is how to restore from backup: tar zxvf WordPress.tar.bz [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[312,4,315,33,122],"tags":[370,86,369,395],"class_list":["post-1300","post","type-post","status-publish","format-standard","hentry","category-databases","category-how-to","category-mysql-databases","category-webapps","category-wordpress","tag-backup","tag-mysql","tag-mysqldump","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts\/1300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/comments?post=1300"}],"version-history":[{"count":0,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts\/1300\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/media?parent=1300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/categories?post=1300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/tags?post=1300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}