You can make wordpress have a dynamic url which will allow it to take any domain pointed to it. Put the following code towards the bottom of your “wp-config.php” file.
// Make WordPress have a dynamic url
define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST']);
Related Posts:
- Can’t log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
- Login page ERROR: Cookies are blocked due to unexpected output
- Removing username from the ‘wordpress_logged_in’ cookie
- Getting “Cookies are blocked or not supported by your browser” on login page
- Cookie settings for session across WPML subdomains using custom AJAX login
- Login redirect_to loop with reauth=1, cookie expiry set to 1 year in past
- Get user ID after logging in
- Login with cookie but without using WordPress code
- Get wordpress stored cookies for custom login
- How to get login data (session) outside WordPress?
- Login cookie across multiple domains on network w/ mapping
- Can’t login after URL change
- How to set different cookies for logged in admin users and logged in non admin users?
- 2 wordpress blogs with 1 users table and 1 login
- v5.6.2 User cannot stay logged in – wordpress_test cookie placed but not auth cookies
- Removing wordpress cookie from non-wordpress site
- Getting a person’s username from a wordpress cookie
- One time login on 2 different WordPress sites
- How to force “remember me” users to login again?
- Multiple issues with Ajax login function due to browsers and cookies
- Sharing a logged in session with a custom subdmain site?
- Get WordPress logged in username from root domain when WP is installed in a subfolder
- wp-cron event doesn’t run when custom login API is enabled
- Extend Cookie with auth_cookie_expiration not working
- Custom login method appears to ignore auth_cookie_expiration
- Why deleting/removing cookies in WordPress does not log me out from admin?
- Cookies error during first time login attempt
- Opening protected page with cookie?
- WordPress Cookies – wp_set_auth_cookie
- Why doesn’t the “Remember Me” checkbox work for me on a live website? Only works on a local server environment
- Share login status across subdomains without network
- How to remove without touching the pluggable.php the wordpress_logged_in cookie to show the username on login?
- SSO / authentication integration with external ‘directory service’
- Preventing session timeout
- Check for correct username on custom login form
- ‘Password field is empty’ error when using autofill in Chrome
- Prevent wp_login_form() from redirecting to wp-admin when there are errors
- How to disable autocomplete on the wp-login.php page
- how to display the wordpress login and register forms on a page?
- Is it alright for two people to simultaneously be logged into a WP site as administrator?
- How do I turn off the ability to login?
- WordPress Login Footer URL
- Save last login date in global before change it?
- password protect individual pages
- Change register form action url
- Rendering of custom walker menu function not working properly
- Force user to login in home page
- Login as a client no dashboard menu?
- Allow access to a page for admins only
- Right practice to edit WP reset password email
- deny IPs from wp-login using .htaccess
- Why is my staging subdomain not sending wordpress_logged_in cookies?
- How To Change Wp Register/Login URL Permanently To My Custom Page
- How can I prevent my custom form from redirecting to wp-login?
- Custom Login iframe doesn’t work
- wp-admin returns 404 [closed]
- What would be the best way to implement Magic Link logins in WordPress?
- Can’t login to WordPress without hitting the Remember Me checkbox. Potential SSL implementation bi-product
- Is it possible to designate the login.php as homepage?
- Redirect login page except on reset pass
- Redirect users after failed login attempt?
- How to secure files based on format and word in file name with wp-config or htaccess?
- Redirect to custom variable
- Get the url of custom login page in the registration page
- Single sign on with custom site
- By registering always make uppercase the first letter of the login
- Best option to implement external register/login to WP from self-made API
- Enqueue new login style sheet
- WordPress Conditional Login Links
- Do more action after login successfully
- I cannot login and am getting this error message. .
- Can I Get User ID at Login?
- Cannot log into migrated site
- WordPress SSL not working [closed]
- Reset Password Limit not working
- User not able to sign in after wp_authenticate() and wp_signon() wordpress
- WordPress site login Redirect
- Thank You Page Layout Differs on User Logged In Status
- On Homepage “is_user_logged_in()” function is not working after login and it is working after refresh the page?
- Problem in auto login after registration
- Cant reset password my wordpress password not even with phpMyAdmin
- How to invalidate `password reset key` after being used
- Does it make sense to check a nonce on user log in?
- Special link for no automatic login (no username and no password)
- Building a custom login form – encountering issues
- Making sure two different wordpress website has auto login
- Site login failed due to strange warning
- Improvements to “limit login attempts” plugin
- loging to Admin page not working at all
- Can’t login through wp-login.php on fresh installation
- How to login a user with wp_set_auth_cookie on a specific blog within a multisite environment
- Authenticate return value
- Front-end login problem: requires re-authorization when accessing dashboard
- Using wp_login_form passowrd as undefined
- Redirect non-members to about/intro page
- When trying to login if already logged in, form just shakes – error message remains empty
- Handle POST request sent from an external site for login?
- Unable to login after adding ReCaptacha without API key
- How to create an alternative login page that does not use any plugins?
- Remove login link from Reset Password-screen