Leave your database alone. Instead insert two lines in your wp-config.php
on the local server:
define('WP_HOME','http://yourlocalserver/yoursite');
define('WP_SITEURL','http://yourlocalserver/yoursite');
The rest of what you are doing probably doesn’t matter and editing the SQL export is prone to error so you could easily be breaking things.
Related Posts:
- Import live site to local setup without access to live site
- Cloned site not connecting to database – MAMP
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Connect to remote database using Localhost install
- Best way to move live site local
- Have multiple local wordpress installs share a wp-content folder and database
- Connect to live db whilst working locally
- Moving online website to MAMP or dumb idea?
- Moving minor updates between local and live sites – just database?
- Connect to a remote database for wordpress in my own hosting server
- Difficulty importing my live site to local
- Problem migrating to localhost
- Can local WordPress installs share /wp-content/ folder and database?
- How to transfer from localHost to live but use the already existing database on the server?
- Image link issues after importing a database backup to my local web server
- Installing local to live WP into subdirectory
- Database migration issues – Error #1046 No database selected
- Getting “Error Establishing a Database Connection” on localhost in new Mac OSX Lion environment
- Cloning blog to localhost via WAMP
- New installation fatal error in 5.9.3 at edit or create entry
- Recovery – Restore Database after moving folder location locally
- How to re-connect WP files in lampp/htdocs to new SQL database to recover site under development
- Error establishing a database connection with XAMPP
- Search and Replace in Windows XAMPP site
- Locally installing wordpress. Database problem
- I have my full special database from xampp how can i use this on wordpress?
- Does WordPress Support Using Named Pipes on the Windows Operating System?
- Local Content different from Remote Content
- How can I work on a database along side a client?
- Restoring .sql backup results in “Error establishing a database connection”
- Trying to edit a WP site locally using MAMP
- Theme Options – localhost to new url
- Can I connect WordPress website with an external database?
- Staging sites, how do you manage synchronising updates in the DB?
- How to get the post publish date outside the loop?
- Using transients in conjunction with memcached
- How to define composite keys with dbDelta()
- Has parent field in the table wp_term_taxonomy has term_id or term_taxonomy_id
- Forcing nickname as display_name in custom edit profile template
- Export WP database for import using WP-CLI on Vagrant Box
- Showing content from another wordpress installation database in the page template loop?
- Multiple WP install with same users database
- Dynamic data in `wp_register_script` needed
- Why is $wpdb->get_results failing on certain tables but not others (which have data)?
- How to correctly add a table to the WordPress MySQL database
- How to verify password outside WordPress?
- How do I properly update the WordPress database password?
- wpdb_prepare with multiple or condition
- $wpdb->insert is not working
- WordPress Install and Database on separate hosting?
- Moving a site from a temporary domain to the live domain [duplicate]
- Error establishing a database connection on Installation
- What is this in my tables
- WP get stuck with a query on MySQL when the site is resumed
- Routine to convert custom post meta from old to new value
- Trying to change database tables storage engine to innodb gives error “invalid default value for ‘post_date'”
- database connection [closed]
- sanitize POST arrays
- Able to use all admin pages but in the frontend there is a “Error establishing a database connection”-Error
- Undefined Variable: mysqli error when connecting to database
- Localhost to Staging to Development Dynamic WP-CONFIG
- Selectively restoring original posts from a compromised site to a freshly installed WordPress database
- Which data is written and stored in the database when read-only (non-posting, non-commenting) users visit the site?
- $wpdb is not initiating
- Duplicated site isn’t recognized as a site
- My options table is huge. What can I do?
- Changing root password in PHPMyAdmin for WordPress Database when going live
- WooCommerce: remove sample & dummy data
- multiple wordpress installation with shared usertable on an different database
- wordpress database restore – broken link
- 6 random character prefix automatically added to entire DB tables, how / why? [closed]
- Insert Custom Data into wpusers
- What unexpected data might be stored in terms table and related tables?
- Connecting to wordpress database in my application [closed]
- Is it good practice to import/export a blog to test a redesign?
- change the year on all of my custom post types?
- WordPress keeps redirecting to localhost
- get value from ‘terms’ table
- custom tables in wordpress Database? (can i just create them with sql?)
- Storing transients giving database error
- Displaying requested data from a the database in wordpress
- Accidently changed the GUID
- local wordpress broke after changing URL
- Is it safe to add INDEX to a column in WordPress database?
- Restore Old Database Over Newer WP & Plugin Files
- Not sure what to do next to optimize
- Database structure for thousands of posts
- $wpdb not working
- Accessing content from third party as native posts in WordPress
- Extracted CSV as Array for Custom Query Loop
- Hang Up Followed By Can’t select database
- One WP Database outside localhost and two connections
- Fetch data from another site, but the same database
- Changing themes on locally hosted webpages
- Every time I update or install a plugin I get “Error Establishing a Database Connection in WordPress”
- Upload wordpress from localhost to 000webhost
- SQL query to rewrite all media URLs to end with .webp
- Many images in wp-content/uploads folder that are not in Media Library