I normally use mysqldump and sed:
on old server:
mysqldump -u user -p OldWpdatabase > wpdb.sql
sed -i 's/oldurl/newurl/g' wpdb.sql
on new server:
mysql -u user -p NewWpdatabase < wpdb.sql
sed is used to search and replace all the hard coded occurrences of the website if needed.
Related Posts:
- How To Export/Import WordPress (MySQL) Database Properly Via Command-Line?
- Export WP database for import using WP-CLI on Vagrant Box
- MySQL Syntax Error upon restoring database from backup [closed]
- 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?
- I broke database after reuploading local version – what exactly happened? Database error
- export individual posts to text files or a single csv file
- What is “Advanced” SQL?
- Oracle SQL query for Date format
- Why is my database import losing text widget data?
- WPDB Insert or if exists Update
- Where are image paths to product category images stored in WordPress database
- Sharing database for collaborative development
- Display data from a non wordpress database on a page template
- Best way to import users, post and categories from an external database
- What’s the database relationship between a post and its attachments
- Organizing WP Pages based on old website database
- Importing posts from old website to new conflicting post ID’s?
- Exporting revisions
- Export wordpress table to excel
- When importing database, it shows error
- Inserting Post Meta From SQL
- Bulk Update of Custom Post Type Post Status through SQL
- How do I add indexes to WordPress Database?
- Moving an entire wordpress site from one domain to a new domain and database
- Change SQL get_results to search for posts with custom term in custom taxonomy
- Block search SQL from happening
- wpdb query on custom table not working [closed]
- How to execute mulitple statement SQL queries using $wpdb->query?
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Is a direct or import approach safer for migration into WordPress?
- Query WordPress database by registered date and role
- Is it possible to import a wordpress backup from a single site in to a multi-site configuration?
- Using table lock with wp_insert_post?
- Scheduling posts in database
- Size article thumbnails and retrieve them directly from database
- Importing New Posts from Live Site into Local Dev Site
- How to query the WordPress database to get posts of a certain custom post type, taxonomy and field?
- How much of my site can I recover from public_html?
- wpdb_prepare with multiple or condition
- Uppercase to sentence case for post titles
- SQL Error wp_commentmeta – incorrect table definition
- Import live site to local setup without access to live site
- phpMyAdmin displays error when importing database
- Error establishing a database connection; After importing DB & Theme
- 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)?
- WordPress database import: Row size too large
- Create a clone from one WordPress site to another in a few minutes
- How to Mirror WordPress database from Remote server to Local server
- WordPress is not creating table in database after activating plugin,
- Bulk-create posts from SQL database
- Exporting table to csv works in the admin but exports HTML data when used on the front end
- Difficulty importing my live site to local
- How can i customize the export personal data file?
- Importing CSV into database table not working?
- WordPress Database Huge wp_usermeta Table
- Create table from array with prepare
- Setup private content for specific users with daily updates [closed]
- WordPress Local And Live Site
- Connection refused on locahost after importing database?
- Which data is written and stored in the database when read-only (non-posting, non-commenting) users visit the site?
- Insert Query not working in the form
- WPDB SQL query with prepare() returning variable, not db value
- Importing Direct to DB – GUID Question
- Problems with moving my WordPress site to another domain/server
- Export a custom Mysql database product catalog to WordPress
- Why this query is not showing any result on wordpresss home page?
- Is it possible to have more than 1 MySQL database in my WordPress blog?
- pull data from a remote wordpress database
- How to migrate a database from a server to another
- Is there an easy way of exporting posts with their category already asigned and pictures from localhost?
- Clear Terms from Taxonomy for Specific Post IDs?
- Is my way to change WordPress server is correct?
- Why does changing Database Table Prefixes result in loss of content?
- Options on how to Display member specific data from a MS SQL database
- Delete/Replace words from X to Y in post content
- SQL query to set posts in bulk based on the post content
- How to delete a particular row in a database table
- Delete all posts that do NOT have a specific tag
- WordPress database products structure
- Location of WP default mySQL tables creation file?
- $wpdb->get_var – What value is returned when zero records are found?
- How to display data from db in select list [closed]
- WordPress SQL – How to Check for Category?
- Getting value from database table depending on field value
- Exporting by table
- custom tables in wordpress Database? (can i just create them with sql?)
- Accidently changed the GUID
- DB prefix not updating
- Deleting empty meta key values
- Bulk Edit Media Library alt, caption, image names
- Sql query to get all metadata for a post
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- Job and Employee Performance Tracking with Product Safety
- SQL database import #1046 error
- How do I loop/iterate through posts to edit all img tags?