Define new website url in wordpress

In WordPress, a new website URL is defined by setting the site_url and home_url options in the wp_options table. Here's how to do it:

Method 1: Using the WordPress Admin Dashboard

  1. Log in to your WordPress dashboard.
  2. Go to Settings > General.
  3. In the WordPress Address field, enter the new URL of your website (e.g., https://example.com).
  4. In the Site Address field, enter the new URL of your website (e.g., https://example.com).
  5. Click Save Changes.

Method 2: Using the WordPress Database

  1. Connect to your WordPress database using a tool like phpMyAdmin.
  2. Navigate to the wp_options table.
  3. Find the site_url and home_url options and update their values to the new URL (e.g., https://example.com).
  4. Click Go to save the changes.

Method 3: Using a Plugin

  1. Install and activate a plugin like WP Site URL Changer or Site URL Manager.
  2. Configure the plugin to update the site URL to the new value (e.g., https://example.com).
  3. Save the changes.

Important Notes:

After updating the site URL, you may need to update any external links, such as social media profiles or email newsletters, to reflect the new URL.