Do not alter any table names. In both sites (just to be sure) in wp-config.php
set the WP_SITEURL
and WP_HOMEURL
to the related domain so these constants should be http://wow7.ro
on the main domain install and http://lol.wow7.ro
on the subdomain install.
See Codex.
Note that it doesn’t work for links insrted inside post or page content, because they are saved statically in post content, so in the database, and once the database is the same…
Also note that if you install some caching plugins it can brings problems…
After that inside the template you can use that constants also to conditional show content in the site:
if ( ! defined('WP_SITEURL') || WP_SITEURL = 'http://wow7.ro' ) {
// do something for main domain
} else {
// do something for subdomain
}
PS: in WordPress multisite means a WordPress installed with network of sites enabled, and this not seems your case.
Related Posts:
- Serve HTTPS requests from subdomain
- How can i run the same WordPress install on multiple subdomains?
- Serve HTTPS requests from subdomain
- How to use alias domain for multisite installation?
- Changing Multisite URL after the subsite has been in use
- How do I use different domain for subdomains in WP Multisite?
- WP Multisite – domain mapping to domain.com and separate site to domain.com/help
- How to retrieve TLD domain for the current website?
- Moving website from expired domain to an active subdomain
- Installed WordPress Location
- Install multisite wordpress on a subdomain and map to top level domains
- Multisite on single wordpress
- Relative Root Url For Sub domain name
- Subdirectory mapping for a WordPress website
- How can I move the subdomain to the root domain?
- Can I edit domain settings if I didn’t create the site?
- Multisite has SSL certificate, but media library is still http://
- new WPMS site not working / Q setting up new site/subdomain
- Question of the subdomain
- Can I use WP’s built in domain mapping with WP installed on a sub-domain?
- Changing blog domain name
- I have a question about the name of my blog [closed]
- Change author URL from /author/xyz to a subdomain xyz.domain.com for each new registered users
- How to use WordPress Multisite With Different Domain Names?
- How to share cookies and sessions between domain and subdomain?
- Mapping Domains to Permalinks (not multisite)
- Can a multisite’s blogs be accessible from two different sub-domains?
- WP Multisite development with Mamp Pro and wildcard subdomains, not really working for me
- WordPress Multisite. Can domain be used instead of subdomain?
- Htaccess for Wordpess set on single subdomain
- Share WordPress Login Cookies Between Two Subdomain Installs
- “Preview Changes” button doesn’t show changes for previously published posts/pages
- How to let a single post have its own domain name
- Using subdomain m.website.com for mobile theme?
- Setting two top level domains for multisite
- How would you detect if WordPress is installed in a subdirectory (not root)?
- Possible to create a multisite network where the main site is non-WP?
- Multisite Subdomain Using More Resources Than Others?
- Changing admin sub-domain in WordPress multisite
- Classic Conundrum: How do I map a Sub-Domain in WordPress? [closed]
- How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url
- General Settings for WordPress Subdomain
- Moving a blog from a subdomain to a folder
- Child Site doesn’t appear in the Network menu
- How to serve assets files (js, css, images) on a subdomain
- How to redirect one page on the subdomain
- Changing domain
- Migrating wordpress multisite and domain mapping plugin
- Can I have the same wordpress site under different url?
- Moving WP installation form subdomain
- WordPress Multisite Strange Redirect on Primary Site
- Network of subdomains [closed]
- Change the subdomain?
- Multisite – Looking for ideas to best manage a main site change
- One WordPress Installation for 2 Domains
- Multiple domains showing same content
- new subdomain to apply as main domain
- Login problems on multisite installation with different domains
- Two domain for one site not working in mobile
- How to host 2 subdomains as lookalike destinations under one master domain?
- Adding existing domain name to WordPress.com
- WordPress MU subdomain vhost
- WordPress CDN Subdomain URL not accessible to the public
- How can I redirect some pages to new subdomain? [closed]
- How do I (re)design my corporate website in WordPress without downtime?
- Different Domains in Multisite Setup
- change wordpress upload url to subdomain on xampp local
- Can I have a WordPress site stored on a subdomain of another website owned by me?
- WordPress Multisite with subdomains on different domains
- Folder wordpress page redirect
- Subdomains permalinks issues
- Run two wordpress on the same domain
- Folder structure when using multiple domains with WordPress
- Replace .wordpress.com url with a domain name
- Subdomains pointing to a permalink URL
- How to make each category a subsite?
- When i try to enter subdomain i’m redirected to main domain
- Can’t login to WordPress admin panel after changing domain to use WordPress pages as a fallback from React
- WordPress Multisite and how to apply sef urls only to specific sites
- How to Set up a Wildcard Subdomain for all WordPress Posts?
- WordPress cloned but frontend still displays http://old_wordpress_site
- different domains disabled in polylang
- WordPress deleting subdomain from the URL
- Serve theme and plugins assets from correct domain on multi-domain multisite
- After switch domain, some parts of my site still point to my old domain
- Issue while installing wordpress in subdirectory due to SSL [closed]
- Add subdomain for Vue.js application
- Create a new hyperlink to wordpress blog
- Domain name to a page
- Multisite: Run a subdomain install from a directory install
- Single WordPress Installation with Sub domains
- Why is my subdomain returning a 403 status?
- Multisite redirect loop for a single www domain
- Some Subdomains on a Multisite Install Not Found
- Is it possible to put a site other than #1 as a Multisite top-level domain?
- WordPress.com-registered domains
- Generated URLs don’t reflect accurate URLs.
- how to get my WP site’s IP? [closed]
- Cookies in Multisite network where sites have their own domain name?
- Development to production, how to move a development site from http + dev.example.com to a production site https + example.com?