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
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Export Pervasive to MySQL (C#)
- MySQL SELECT increment counter
- WordPress (MyISAM) database is slow, should I switch to InnoDB?
- WordPress Database lost auto increment
- wpdb->insert multiple record at once
- Slow wp_term_relationships query
- How to use “TRUNCATE TABLE” MySQL statement?
- Importing posts from old website to new conflicting post ID’s?
- Exporting revisions
- Export wordpress table to excel
- When importing database, it shows error
- WordPress for a very large website
- WooCommerce with thousands of products – site is very slow – optimize db queries? [closed]
- WooCommerce – Query for ordered products
- Import 10,000 Users into WordPress WITH a specific ID for each user
- Error establishing a database connection – with Debug Data
- Is a direct or import approach safer for migration into WordPress?
- Database with mixed collation (utf8mb4 & utf8_general_ci)
- Query WordPress database by registered date and role
- Tons of Twitter rows in my database
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Importing New Posts from Live Site into Local Dev Site
- Does WordPress ever need multiple databases?
- Why are no posts showing despite my apparently correct DB restoration?
- Select Multiple meta_value from WP DB; Single Query
- Delete all post meta except featured image Using SQL
- Is it possible to split database tables using HyperDB?
- Adding new row to wp_post table
- What happens if I overwrite the current wp_options table with a backup from a week ago?
- SQL Error wp_commentmeta – incorrect table definition
- WordPress database error – Error in SQL syntax – I can’t identify any error?
- CRUD operations using WordPress database API
- Unknown collation when I import a dump from an existing site into a development database?
- Is MariaDB’s Aria storage engine suitable for WordPress?
- Slow queries constantly getting stuck on WordPress database of ~100,000 posts
- How do I query wp_options for expired transient pairs with MySQL commands?
- WordPress Local And Live Site
- WordPress running SQL query to update database from form
- How to fix database error duplicate entry
- Migration: Copying database content to a different server
- Connection refused on locahost after importing database?
- How do I convert a MySQL database from utf8mb4 to utf8 encoding?
- Query multiple tables at once?
- creating new field on mysql
- Remove empty rows from the database
- Custom WordPress Table wpdb
- Why this query is not showing any result on wordpresss home page?
- Database Update Required – Update from command-line
- Best practice to limit results in get_row()?
- Is there an easy way of exporting posts with their category already asigned and pictures from localhost?
- Trouble running $wpdb->query() with last_insert_id
- how to encyrpt DB_PASSWORD in wp-config
- SQL query to set posts in bulk based on the post content
- 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?
- 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 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
- next comment id number wordpress
- Merging development site with live site
- The MySQL Connection could not be established., before it was joomla but i have change it into worpress
- How to extract some part of WordPress full source code
- Missing latest posts and options after DB migration via phpMyAdmin
- Check if a database is well installed
- live site do not update after importing sql database
- How do i get value from wp_postmeta?
- “MySQL server has gone away” since update to 3.8
- featured image not showing up with mysql_connect
- MySQL Database User: Which Privileges are needed?
- Import Excel (or csv) Table with user-data as subscribers to wordpress
- Print output of Table Creation
- Saving data to database and exporting to excel
- SQL query : Select a thumbnail for a media
- SQL Query to get post_id from wp_posts and and meta_key(s) from wp_postmeta
- WordPress database connection failed, while mysql client is working [closed]
- Have WordPress Use a Different Database for users