Put this in your theme template functions.php
update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );
Related Posts:
- How to set ipv6 address as siteurl?
- Changing www prefix in General Settings and Interior Links
- What does $scheme in site_url function do?
- Get current url with parameters passed
- Override WordPress theme url
- How to Create a Staging Site / Changing URL
- get_template_directory_uri cached?
- WordPress site isn’t reachable after site & home URL modification
- wp_options siteurl and home hardcoded?
- Unable to load WordPress local site after changing WordPress Address (URL) and Site Address (URL)
- can’t access my site [closed]
- Dynamically update Site/WordPress Address
- Does WordPress Strip Away the WWW from a Web Address
- Why is a wordpress login session limited to one domain
- problem with guid, when i change the folder name
- I changed the url from the setting then login panel not working
- Querystring value being stripped from site_url()
- Unable to Update Post when Changing Site URL
- WordPress replaces “https://” with “//” for Site & WordPress-URL
- How to delete blog word from wordpress url?
- Updated Site URL but it is not reflecting the changes
- How to set a home page on a WordPress site?
- How to add www to images?
- WordPress database nonsense error
- Keeping the URL but changing the site – How?
- change the URL title and tagline
- Is there a way to append a trailing slash to get_home_url() and get_permalink( get_option( ‘page_for_posts’ ) )?
- I changed the site address and wordpress address from localhost to my ip and it doesn’t work anymore
- Switching MultiSite installation from HTTP to HTTPS
- Prevent “main” WPMU site_url() being returned in functions
- Switch from https back to http
- Getting the Site URL Including the Front Base
- Relative or dynamic site url possible?
- Ban SiteNames Multisite
- Run WordPress frontend and backend in different domains
- How to inject custom url path for page ?
- Login to wp-admin “redirect_to” points to wrong URL after migration
- Remove HTTP: from the site URL and just keep // in it
- (How) Can I change my Multisite Network to use a different blog as Primary?
- Login redirect_to loop with reauth=1, cookie expiry set to 1 year in past
- How to get rid of index.php?
- Woocommerce different URL for every table placed in the restaurant
- Do I need to use the esc_html() function on hard coded links?
- Redirect main domain to subdirectory
- Getting links to work the same on development and production
- Modify site URL via functions.php of a theme
- Headless WordPress – Issue with plugin path
- URL parsing – what is it?
- Hard code a domain into Yoast SEO canonical URLs
- When clicking on “home” page from any other page, it goes to IP address and my website doesn’t load
- WordPress URL redirect
- Pass GET params to URL from a main menu item
- What do the schemes login, login_post, admin, and relative mean?
- WordPress Multi-Site on Ubuntu 18.04 LAMP Keeps Re-Directing
- How to bulk edit image url in featured image and product description?
- Multisite with different domain names on different servers
- WordPress keeps redirecting me to online site [closed]
- How to achieve my custom post url structure?
- WordPress: how to change URL for individual MultiSites?
- get_template_directory_uri not dependent on WP_HOME in wp-config.php?
- How do I get the site url from a Block (within the block editor)
- WordPress get parameter ‘unapproved’ and ‘moderation-hash’
- WSOD 3.9.1 – Tried Everything so far
- Changing the color scheme based on the url visited
- wordpress url correction
- How to return site_url() without https://
- Include www prefix in site URL
- Cannot access WordPress website from external IP while internally it is working properly [closed]
- How to make tag pages look as /tags/%tagname%/ in the URL?
- What is the best way to revert to www version of domain name?
- How to add a forward slash to the end of wordpress home?
- home_url on IIS missing permalink index.php
- Get logged in username in wordpress url
- URL problem: www.sitename.com/blog and www.sitename.com/learn using same WP installation
- Abnormal activity at url /my-account/add-payment-method/
- Changing siteurl in the database not working
- How to stage a redesigned site on a new webhost while the original site is still live? [closed]
- WordPress is adding “category” word before my actual category name in url (and this is unsolicited)
- Add www to the Root Site in WP Multisite Network
- WP returns to domain root instead of siteurl
- Multisite problem with unexisting paths to CSS etc
- How to rename a wordpress site from http://myserver.example.com/blog to http://myserver.example.com/somethingelse or just http://myserver.example.com
- Deleting /wp from my website URL
- SSL not working fine, Home url not matching with site url wordpress errors
- Hide WordPress Site URL from Source Code
- Permalink not changing according to post type
- There is how to change url domain on some posts?
- Landing function through URL
- change home_url and site_url but don’t redirect to home_url and site_url on load
- Unable to get WordPress’s apply_filters(‘site_url’) to return a https scheme
- Blog broken after changing Site/Home URL
- site_url() returns with additional backslashes
- Moving Site: Is Re-downloading Files After Changing URLs necessary?
- Two domain site: Link base URLs point to wrong domain
- How to retrive previous Domain URL in Wp
- set cookies for my whole site is not working
- Making a site URL
- Remove index.php from URL
- Siteurl code for links
- How to change the default location where new post gets stored?