It is that simple for WordPress too. I use the following to back up my WP sites:
mysqldump -u <user> -p<pass> --quick --extended-insert <db-name> > backup.sql
The mysqldump document gives the details on all the parameters.
--extended-insert is quicker when updating a DB from a dump file and makes the dump file smaller.
--quick makes the creation of the dump quicker.
You don’t really need to use either of those, just makes things a bit quicker and writing an insert for each row just makes me feel happier – your original dump syntax would be just fine.
Don’t forget though that there is domain-specific entries in the DB so if you are using this method to backup/restore then you are fine but if you want to move from one.com to two.com then you will need to edit entries in wp_options after you restore your dump.
Related Posts:
- MySQL Syntax Error upon restoring database from backup [closed]
- Why is my database import losing text widget data?
- Export WP database for import using WP-CLI on Vagrant Box
- WordPress database import: Row size too large
- Export / import WordPress database
- How to Mirror WordPress database from Remote server to Local server
- Merging two databases without borking it
- Import users from old WP site to new one
- Best practice to import user base (subscribers) from one website to another?
- Importer fails to import every post
- Is it good practice to import/export a blog to test a redesign?
- Exporting Post ID, Post Title, Primary Category and Primary Category ID
- Featured image from custom to WordPress database
- I broke database after reuploading local version – what exactly happened? Database error
- export individual posts to text files or a single csv file
- Importing Concrete5 content to WordPress
- Rename a table in MySQL
- How should I tackle –secure-file-priv in MySQL?
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user ‘root’@’localhost'(using password:YES)
- Using wpdb to connect to a separate database
- The MySQL alternatives: Do Percona Server and MariaDB work well with WordPress, and do they make WordPress go better?
- wpdb->insert multiple record at once
- How to define composite keys with dbDelta()
- Is it possible to define two databases for one installation?
- importing data from non-wordpress mysql db
- Huge wp_options table
- “MySQL server has gone away” since update to 3.8
- Error establishing a database connection – with Debug Data
- How to execute mulitple statement SQL queries using $wpdb->query?
- Can I transfer a mysql database to another site?
- Database with mixed collation (utf8mb4 & utf8_general_ci)
- Is it possible to import a wordpress backup from a single site in to a multi-site configuration?
- Help running a MySQL query to update all wp_#_options tables in a Multisite install
- Is it safe to convert tables from MyISAM to InnoDB?
- Emojis getting converted to “?”
- Migrating database / content of non-CMS site to WordPress
- Delete all post meta except featured image Using SQL
- How do I properly update the WordPress database password?
- wpdb_prepare with multiple or condition
- Adding new row to wp_post table
- WordPress Install and Database on separate hosting?
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- How do I get the posts within a certain year/date(with sql query)?
- Create a clone from one WordPress site to another in a few minutes
- Using GROUP CONCAT in my-sql query with wp_usermeta table
- Exporting table to csv works in the admin but exports HTML data when used on the front end
- Create table from array with prepare
- Migration: Copying database content to a different server
- Call to undefined function get_user_meta() – trying to access data in MySQL from custom fields
- Connection refused on locahost after importing database?
- Duplicated site isn’t recognized as a site
- Query multiple tables at once?
- Have working sql query… trying to adjust it to use $wpdb
- Changing root password in PHPMyAdmin for WordPress Database when going live
- How to properly check if a table exists in WordPress Database using Show Tables Query
- creating new field on mysql
- Remove empty rows from the database
- Custom WordPress Table wpdb
- Database Update Required – Update from command-line
- how to encyrpt DB_PASSWORD in wp-config
- SQL query to set posts in bulk based on the post content
- How can I detect right db type?
- Changing order of db results when encoding to JSON
- Second ezSQL initialization for MSSQL
- Fetch a single row from a custom table for to a given ID
- Database create or redirect
- How to escape percentage sign(%) in sql query with $wpdb->prepare?
- Link multiple user databases together?
- Recovery – Restore Database after moving folder location locally
- Replacing javascript link in WordPress database without getting mysql syntax errors
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- Set a cron job to delete a specific database table table every midnight
- how to access 2nd Mysqli Database from different server for wordpress
- Error establishing a database connection – WordPress setup, everything else is working
- How to import products in host instead of database on wordpress?
- I would like some help wth an SQL query to link posts with categories
- Where is the HTML-handler part in the wpdb class?
- Exporting Post type from one theme and importing it to another theme
- How to map data on CSV to web pages?
- next comment id number wordpress
- Search and Replace in Windows XAMPP site
- How can i syn wordpress user table with a stand-alone php script?
- How can I get $wpdb to show MySQL warnings?
- Merging development site with live site
- The MySQL Connection could not be established., before it was joomla but i have change it into worpress
- WordPress Database Posts Table query
- How to extract some part of WordPress full source code
- Check if a database is well installed
- live site do not update after importing sql database
- Why are my WordPress post queries so slow?
- MySQL Database User: Which Privileges are needed?
- Import Excel (or csv) Table with user-data as subscribers to wordpress
- Print output of Table Creation
- Migrated to Namecheap, now Trouble with Database & wp-config [closed]
- Saving data to database and exporting to excel
- SQL query : Select a thumbnail for a media
- How to find fresh (last modified) and sql backup?
- Understanding Redundant postmeta Tables in WordPress Database
- Naming conventions for database tables