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
- Can’t change url because site address is greyed out
- 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
- How to Convert Parent Page’s URL in Singular Name format when Child page is open
- Prevent “main” WPMU site_url() being returned in functions
- Getting the Site URL Including the Front Base
- Remove All Query Arg
- Pulling a parameter out of the URL of a WP link without “?” or being sent to a different page
- How to set global variable in functions.php
- Can’t login after my site was moved to a new server
- Adding a hook to ‘parse_request’ so that siteurl/pagename/xyz ignores “xyz”
- How to have numeric URLs in Posts and Pages
- Generate one time URL
- In Settings>>General I am missing some fields
- Adding target and _blank as it’s value to the allowedtags
- Components used in Themes and Plugins: How to get file URL?
- Site URL always in front of other URLs
- Easiest way to simulate WordPress’s URL resolution to retrieve post ID, etc?
- Moving a test WP site to live
- How to redirect URL with subfolder to the same URL but without subfolder?
- Allow Chinese character on post URL slug
- Problem with change url for all subpages (.htaccess)
- Displaying Post with Custom URL with RewriteRule or add_rewrite_rule
- WordPress keeps redirecting me to online site [closed]
- How to get URL for the first page of post archive
- How to handle this URL Structure. Keep getting “page not found”
- Custom url in wordpress
- URL issue after migrating to dev site
- Misentered the site address url. How to recover? [closed]
- How to call for bloginfo inside function in functions.php?
- Moving a WordPress site – Installation issue
- wordpress url correction
- What is the best way to figure out which template file that a “pretty permalink” is using?
- Can’t change the wordpress site url
- How do I convert my WordPress website to be domain agnostic?
- Wrapping add_query_arg with esc_url not working
- Relative URLs within site
- 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?
- Go back to my home page
- Changing url of author page
- How to get previous and Next Post Url in the_post_navigation
- Thousands of unwanted URLs/pages with “0” in slug created
- Multisite problem with unexisting paths to CSS etc
- How to remove % character from url
- 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
- There is how to change url domain on some posts?
- 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
- mysterious issue with stop words in urls not working – how can I restore multiple url access?
- How To Change the URL of a WordPress Multisite
- Moving Site: Is Re-downloading Files After Changing URLs necessary?
- How to create a dedicated folder for specific role via registration
- How to get the correct URL on my wordpress site?
- WordPress custom form post to different page
- 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
- Modify WordPress to not replace + (plus) characters from URLs?
- How to remove slug from url (custom post type)
- Enabling canonical links to force search engines to go to site.com rather than site.net [closed]
- Accidentally changed the url
- What purpose does /embed/ URL have and how to avoid SEO problems?
- Allow question marks (?) in WordPress permalinks