If I understand your question correctly you will need to adjust the above code to the following:
define('WP_HOME','http:example2.com/yoursubfolder/');
define('WP_SITEURL','http:example2.com/yoursubfolder/');
Give that a try.
EDIT:
you are missing the slashes on the http also –
define('WP_HOME','http://example2.com/yoursubfolder/');
define('WP_SITEURL','http://example2.com/yoursubfolder/');
Related Posts:
- Two domain site: Link base URLs point to wrong domain
- How to remove /index.php/ from URL’s
- Run WordPress frontend and backend in different domains
- How to remove “http://” When Echoing URL?
- Change homepage url
- Multiple domain names for one site
- How can I change all links on pages to point to a different domain from where the site is hosted?
- Remove site root trailing slash
- URL parsing – what is it?
- Changing my site url from azure.net to custom domain
- Remove / from www.example.com/ [closed]
- Special domain for a page
- Best way to give site sub-page it’s own domain?
- Avoid the removal of “https:” from URLs
- WordPress get parameter ‘unapproved’ and ‘moderation-hash’
- Changing the website URL to the root folder
- Showing my server ip in source code for several links not for all links
- How do I avoid messing up URLs when switching from example.com/subdir to example.com?
- Cannot access WordPress website from external IP while internally it is working properly [closed]
- DNS – Change WordPress Site Name?
- Alternatives to site_url() and get_template_directory_uri()
- What is the best way to revert to www version of domain name?
- Changed domain name and all the 301 redirects work except the ones for the thumbnail image which return 403 Forbidden error
- Changing siteurl in the database not working
- How to make a seo friendly URL of 2 different pages with same words
- Why my URL has an unknown character string?
- How to properly setup MAMP and XIP
- Domain name to a page
- Making a site URL
- Why my wordpress site URL does not begin with my domain?
- My Website’s Main URL redirects me to an Archive Page
- Difference between esc_url() and esc_url_raw()
- Pulling a parameter out of the URL of a WP link without “?” or being sent to a different page
- Why WordPress automatically removes http from the url of my website’s sub domain?
- WordPress Move to SSL How to Update Media Assets to HTTPS?
- Moving wp-content outside of web root?
- Woocommerce different URL for every table placed in the restaurant
- permalink for category pages and posts
- Get url from file uploaded in Media Library
- Allow UTF-8 characters in the user slug part of URL
- WordPress converting ../url to http://../url
- home_url(); showing current page instead of site address
- Can URL remain the same if migrating from Drupal?
- Site URL always in front of other URLs
- Easiest way to simulate WordPress’s URL resolution to retrieve post ID, etc?
- How to add domain security certification, in WordPress website?
- Imported thumbnails have incorrect URL
- Pass GET params to URL from a main menu item
- Is it necessary to check for `content-type` in headers?
- How can I replace my primary url globally with a parked one?
- How to allow — in category name
- Request parameters in $_GET do not match URL called
- WordPress custom search url
- The requested URL was not found only on localhost
- How to bulk edit image url in featured image and product description?
- How can I change a media attachment URL/slug, so that I can use that slug for a page?
- Problem with utf8 link
- remove query string from homepage url
- Twitter shortlink 404 not found [closed]
- Remove Trailing Slash from Category Base and Tag Base
- Misentered the site address url. How to recover? [closed]
- How to call for bloginfo inside function in functions.php?
- wordpress url correction
- What can I replace ‘.get_bloginfo(‘url’).’ with to return the current URL rather than the home address?
- How to get CGI variables?
- WordPress Subcategory Creates 2 urls for same page (serious issue)
- How to see an item in the admin from its URL? (not sure if it’s a page, post, or what)
- Can’t change the wordpress site url
- How do I convert my WordPress website to be domain agnostic?
- Pass form input via url variable
- Rewrite Most WordPress URLs
- Relative URLs within site
- How to make WordPress urls matching static html urls
- Using WordPress for a site’s static marketing pages and blog at different URLs
- Need to check if user is on a particular page
- How to set path to the image instead of alt in media.php?
- Changing url of author page
- How to get previous and Next Post Url in the_post_navigation
- Multisite problem with unexisting paths to CSS etc
- Encode URL for WhatsApp “click to chat” without loosing accented characters
- append currency to URL
- Create 600 links to separate files on google drive
- Locked myself out of WordPress because I changed my URL and computer shut down
- Cant access my wordpress.org locally
- I changed the URL [closed]
- WP site homepage displays url link at beginning of each featured post
- Unable to login after changing WordPress site url
- Why is my WordPress URL shortened
- How to create URL for Pages/Posts
- How To Change the URL of a WordPress Multisite
- How to get the correct URL on my wordpress site?
- How to retrive previous Domain URL in Wp
- How to redirect WP post with a specific word in the URL
- Avoid too long words in a post title, post content or comment but only if its not a url
- Change URL to filter posts
- Accessing a file saved outside webroot in a wordpress post
- Accidentally changed the url
- Select Tab name to show in browser’s URL
- How to make media URLs Unique
- What purpose does /embed/ URL have and how to avoid SEO problems?