wp-config change url wp-config

  1. Log in to your WordPress hosting account.
  2. Locate the wp-config.php file in your WordPress installation directory.
  3. Download a backup of the wp-config.php file to ensure you can restore it if needed.
  4. Open the wp-config.php file using a text editor.
  5. Find the lines that define the current site URL and home URL, which typically contain code like define('WP_SITEURL', 'http://example.com'); and define('WP_HOME', 'http://example.com');.
  6. Update the URLs to the new values, making sure to include 'http://' or 'https://' and the appropriate domain name.
  7. Save the changes to the wp-config.php file.
  8. Upload the modified wp-config.php file back to your WordPress installation directory, replacing the existing file if prompted.