Skip to content

Instantly share code, notes, and snippets.

@Shaz3e
Created October 29, 2023 21:22
Show Gist options
  • Save Shaz3e/6024d258a7c25cf0eb989536c5278f93 to your computer and use it in GitHub Desktop.
Save Shaz3e/6024d258a7c25cf0eb989536c5278f93 to your computer and use it in GitHub Desktop.
After WordPress Migration you need to update wp.config.php and Database
#### Update the following commands in wp-config.php
```
define( 'WP_HOME', 'http://www.yoursitename.com' );
define( 'WP_SITEURL', 'http://www.yoursitename.com' );
```
#### PHPMyAdmin SQL Query
```
UPDATE wp_options SET option_value = replace(
option_value,
'http://www.yoursitename.com',
'http://localhost'
) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(
post_content,
'http://www.yoursitename.com',
'http://localhost'
);
UPDATE wp_postmeta SET meta_value = replace(
meta_value,
'http://www.yoursitename.com',
'http://localhost'
);
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment