This question has been asked many many times before.
Here’s the Codex: http://codex.wordpress.org/Changing_The_Site_URL
The easiest thing to do is add a couple of lines to your wp-config.php
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Related Posts:
- How to Create a Custom WordPress Install Package?
- Fallback when Transient API fails
- How to remove “http://” When Echoing URL?
- How to Save Different Settings Options Using Settings API and/or the Theme Optimizer
- Best practice differences in DB options and wp-config between live, staging and local WordPress environments?
- Logout redirects to a broken page(home URL is omitted)
- I don’t see site_url and home_url fields in wp_options table (phpMyAdmin)?
- wp-config dynamic hostname in WP_HOME and WP_SITEURL
- Can’t save checkbox option
- Work flow for multiple developers
- wp_options siteurl and home hardcoded?
- Functions to edit wp-config.php [duplicate]
- Cannot save using register_setting
- Redirect to another page using contact form 7? [closed]
- Block properties, attributes and settings
- Cannot access WordPress website from external IP while internally it is working properly [closed]
- Site Address and WordPress Address settings when using a load balancer
- How can I clear memcached WordPress site options by hand?
- Change of “home” results in timeouts (only on index.php)
- The issue of redirecting my site to a new domain
- Is moving wp-config outside the web root really beneficial?
- What’s the difference between home_url() and site_url()
- Are transients garbage collected?
- How to get the Date Format and Time Format settings for use in my template?
- Add multiple custom fields to the general settings page
- Are all options loaded to memory on each request?
- How does object caching work?
- How to pass arguments from add_settings_field() to the callback function?
- How to use checkbox and radio button in options page?
- how to update serialized options programatically?
- How to pass variable to add_settings_section() callback?
- Performance with autoload and the options table
- What’s the difference between Options & Settings?
- Using widget options ‘outside’ the widget
- Please explain how WordPress works with MySQL character set and collation at a low level
- How to load WordPress on non WP page?
- Switching MultiSite installation from HTTP to HTTPS
- Add additional Network constants to wp-config.php dynamically
- Options for CDN with WordPress Including Supporting Plugins?
- Option to set static front page disappeared from admin reading settings
- How to set up default values for a plugin?
- Getting the Site URL Including the Front Base
- Difference between Option_Group and Option_Name in Register_Settings
- Add on the fly tabs to plugin options
- Why does WordPress use serialize rather than json_encode for the options table? [duplicate]
- Plugin options will not save in database
- No option to allow search engines to index my site in WP 4.3
- How to update an ‘array’ option using wp-cli [duplicate]
- Plugin options autoloading
- Where should I use get_option in a plugin
- Settings API – creating reusable form elements?
- Settings API – changing add_settings_field() output?
- Confirmation before deleting plugin options via uninstall.php
- Efficient way of saving plugin options
- How To Provide Sub-Blogs Their Own Domain Names?
- Set WordPress settings programmatically
- Difference between bloginfo(‘home’) and home_url() and site_url()
- Submenu pages delete settings from options array when saved
- Remove/unset options field from backend Settings->General?
- get_option() from another wordpress site
- How can I get all user options?
- how to use a different domain/subdomain for authors/catagories on single site?
- store simple data in get_option()
- register_setting() vs add_option()
- Settings API – save an array of options as one setting (array_push?)
- Where to hook register_settings for Settings API when also want to update options outside of Settings API?
- Add_settings_field() parameterizing callback?
- How much string content can I store in an option?
- Override Current Theme Setting in wp_config.php
- Multisite: setting theme and options when a new blog is created
- Set a Default Value for an Option?
- How to update widget from widget() function?
- How to set ipv6 address as siteurl?
- Setting ‘autoload’ to ‘no’ with Settings API
- Custom editor field displaying HTML in Visual editor
- Making a configurable field translatable
- Why isn’t get_option array contents displaying?
- Define WordPress image size in img tag
- Serialized settings in rest api
- Save Theme Options (options.php) From The Frontend
- Editor role not saving settings page for custom post type
- get_option() is not working even db contains the corresponding option_name and option_value
- Can’t output do_settings_sections . Can’t understand why
- Set default options for inserting media
- Add custom meta box on Post page
- Settings API erases itself?
- checkbox with get_option not working
- Settings API – how to update multiple options manually?
- Single callback with multiple setting fields
- How to move theme directory but not plugins/uploads out of WordPress root directory?
- Proper use of option_page_capability_{$page_name}
- Settings API – how to update options manually?
- Preferred Use of home_url()?
- How to change the file upload directory on version 3.5?
- Which WordPress option stores the current active theme?
- On Install, which code sets the ‘home’ option?
- update_option method with support of utf8
- Any way to partition wp_options?
- How do I add a value to a wp_options option that is an array?
- how can I detect that option value has changed?