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
- I’ve mistakenly installed another wordpress in my main domain instead of subdomain
- 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
- Hosting a WordPress blog as a sub folder from a S3 website
- How to display a raw HTML page (bypassing WordPress theme, scripts, etc)
- 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
- Load template for specific subdomain
- Localization For Two Different Regions/Domains with the Same Language
- 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]
- WordPress multisite with multiple parent domains
- How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url
- WP MU – Accessing ‘Domain-Mapped’ WP-Admin with a subdomain
- General Settings for WordPress Subdomain
- Moving a blog from a subdomain to a folder
- Child Site doesn’t appear in the Network menu
- How do I make my particular WordPress public?
- 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
- Will WordPress installed on a whole domain interfere with other files in a subdomain or subfolder?
- Network of subdomains [closed]
- Change the subdomain?
- Multisite – Looking for ideas to best manage a main site change
- One WordPress Installation for 2 Domains
- Link structure, WordPress IIS
- 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?
- MU/Subdomains + Domain Mapping + SSL?
- How to use different domains for different blogs hosted in the same host in subdomains with .htaccess
- WordPress subdomain mapping/”archiving” [duplicate]
- Adding existing domain name to WordPress.com
- A WordPress site with more than one domain name / Parked domains
- WordPress MU subdomain vhost
- WordPress CDN Subdomain URL not accessible to the public
- How can I redirect some pages to new subdomain? [closed]
- Multisite – One Site with multiple URLs
- 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?
- Automatically generator a WordPress installation on my subdomain
- WordPress Multisite with subdomains on different domains
- Theme switch when accessed from sub domain
- Folder wordpress page redirect
- Subdomains permalinks issues
- Run two wordpress on the same domain
- Folder structure when using multiple domains with WordPress
- wordpress sub-directory sites on a sub-domain?
- 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?
- multisite installed on subdomain now want another subsite on subdirectory
- WordPress cloned but frontend still displays http://old_wordpress_site