If you’re on a local install, it’s fairly trivial to fix this. Just use phpMyAdmin to reset home_url
and/or site_url
in the wp_options
table in the database.
Switching between two localhost installs is also fairly straight-forward: just don’t actually use “localhost” for anything. Instead, set up a unique domain in your system’s hosts file for each install:
127.0.0.1 site1.localdomain
127.0.0.1 site2.localdomain
Then, in Apache, set each of these domains to point to your different installations (use your vhosts setup). Make sure site_url
and home_url
are set properly and you’re good to go.
Related Posts:
- How to remove “http://” When Echoing URL?
- Unable to load static front page on home url
- Remove site root trailing slash
- home_url(); showing current page instead of site address
- Remove / from www.example.com/ [closed]
- Components used in Themes and Plugins: How to get file URL?
- Is it possible to configure WordPress’s Core Files to accept duplicate Child Categories?
- hijacking home_url for root relative paths
- Showing my server ip in source code for several links not for all links
- Cannot access WordPress website from external IP while internally it is working properly [closed]
- get_template_directory() returns wrong address on VPS
- Making a site URL
- My Website’s Main URL redirects me to an Archive Page
- Custom plugin route in WordPress
- Why is ?doing_wp_cron being appended to my URLs
- use query string in URL to display content on the page
- Change default URL path (/blog/) of blog posts
- How to deal with WordPress on localhost
- How to convert the file path to a URL of the same file?
- Why is WordPress saving full-urls to the database?
- Get taxonomy slug from url
- Load images with http urls inside https post
- Force the Website URL to Include “www” and to be Upper Case?
- WordPress and $_GET Params
- List of default WordPress URLs
- Why WP encodes UNICODE (UTF8) containing urls? Any drawbacks of UNICODE url?
- Force home page to be https?
- add_query_arg() One Key with multiple values
- Change homepage url
- Check what is at URI (post, archive, etc…)
- Why ids in urls don’t work but slugs do?
- Changing my site url from azure.net to custom domain
- How to show the homepage on a different url, like site.com/blog instead of site.com?
- Check request URL for pattern
- Rewrite WordPress Standard Feed URL – /feed/ to feed.xml
- Set a custom URL for image in the Media Library?
- wp_insert_post – How do I prevent incremental numbers on child pages?
- Dynamic URL based on user_metadata
- How to edit URL Slug?
- Publish Post when URL is available else reschedule the post in wordpress [duplicate]
- Change url links on members loops in buddypress
- Find file url in post content and add it to media library
- Localhost port is missing on some links after downgrading MAMP [closed]
- rewrite taxonomy-{taxonomy}-{term}.php terms
- Confusion about Site url and directory
- Multiple URLs with Numbers
- How to properly print a 404 error without redirecton? (i.e. keeping the current URL)
- Will get_bloginfo(‘url’) return URL with backslash?
- Can anybody provide me with a function to generate slugs?
- Is there RELATIVE_PATH, like ABSPATH
- Accessing WordPress using “localhost” and local ip at the same time
- How can I identify which file/function will be used to respond to a particular URL?
- Porting site URLs to new host but with same domain name [closed]
- My #id is not showing in the url when the user clicks on the anchor tag
- Is there a way to test if a URL is part of the current blog?
- Could not find the wordpress page
- An anchor name (id name) in the address bar
- Moving Website-URL
- How to prevent unknown addresses which are accessed from my wordpress website [closed]
- Is there an URL listing latest posts
- Image not showing up in media loader success area – followup
- How do I allow http/ftp access to files I have uploaded?
- Redirecting URL with Twitter Button API Not Working
- Need help changing back the correct wordpress url
- get main URL from subdirectory with php
- Different url to same page (with dynamic content)
- How rewriting a url to make it SEO friendly
- WordPress option com_jce should not work
- Too many redirects (ERR_TOO_MANY_REDIRECTS) only on one page
- Add a paramter to page url
- WordPress Still Requesting Old Url
- Broken Images and Style
- Why my URL has an unknown character string?
- No url when downloading PDF
- Post not redirecting to non www after changing from www
- i1.wp.com url problem (Jetpack not installed)
- Change WordPress names duplicate titles (url)
- incorrect url in Snippet editor
- Use URL parameter to create dynamic content
- Generate new URL for popup form
- In-page link works in Firefox but not in Chrome
- My website has some Crawling Errors?
- How can I modify the ‘Insert/edit link’ option to offer root-relative urls?
- Modify the WordPress URL
- Duplicate pages with ?s parameter
- Populate Website URL at registration time
- WordPress Update Links
- bloginfo no show the right path
- URL Forwarding – wordpress links reverting back
- Get gallery url (Nextgen) [closed]
- How to use query string in URL to display content on the wordpress page
- help me remove this additional parameter in url
- Function to get custom post image URL
- How to echo a dynamic url
- Lost WordPress website access after changing URL [closed]
- How to run Wiki on the same host as WordPress and not get 404 errors when browsing to Wiki?
- Dynamic Buttons According to URL parameter
- WordPress Address and Site Address differ
- WordPress URLs changed to relative on transferring server
- /?clearcache=1670318470 showing up in URL after client logs in