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
- 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
- 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?
- How do I retain url parameters the entire time a user browses my site?
- 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?
- Get the URL of the page from which an ajax request has been launched within ajax callback
- Changing the website URL to the root folder
- Can’t log in. WordPress says my account doesn’t exist [closed]
- Publishing WordPress from stage to production server
- Redirect htaccess [closed]
- Showing my server ip in source code for several links not for all links
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- Replace “http://localhost:8888/” by website URL in WordPress
- dynamic site link for future migration in echo do_shortcode()
- Page inside custom post type (url rewrite?)
- Proper way to have multiple installs with a single database
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- Preventing Canonical Redirect for CDN
- How to make a seo friendly URL of 2 different pages with same words
- How to access wordpress from domainB which is installed at domainA
- Colon is Missing In My Website Url in WordPress Shortcode
- Is bloginfo(‘template_directory’) generated based on WP_SITEURL and WP_HOME in the settings?
- How can I change block editors suggested links to display another url (i.e. from api.mysite to www.mysite)
- Why my URL has an unknown character string?
- Plesk login inaccessible after changing site URL
- How to properly give WordPress its own directory
- URL problem in my site
- Duplicate WP Migration affecting site on separate domain?
- My permalinks for all pages and posts now include old page titles as parents/categories
- WordPress switch domains
- Remove index.php from URL (WP installed in subdirectory)
- Homepage cannot be found
- All styles are looking for the site URL twice
- Hide some shortcodes on posts from back-end
- Error 404 wordpress redirecting URL
- Hijack site url on sub domain for translation
- Giving WordPress it’s own directory and using .htaccess Directory Index
- Changing the site URL
- WordPress site seems convinced that it’s still at its old URL
- Is there a way to get the site_url in HTML code?
- Remove blog slug from WPMU?
- site_url is not honoring scheme
- redirect word-press page with page values
- permalinks url with woocommerce
- Lost WordPress website access after changing URL [closed]
- How to change the default location where new post gets stored?