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?
- 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)
- 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?
- 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
- 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?
- Can I have the same wordpress site under different url?
- Will WordPress installed on a whole domain interfere with other files in a subdomain or subfolder?
- Change the subdomain?
- Multisite – Looking for ideas to best manage a main site change
- Link structure, WordPress IIS
- Two domain for one site not working in mobile
- MU/Subdomains + Domain Mapping + SSL?
- WordPress subdomain mapping/”archiving” [duplicate]
- 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
- 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
- different domains disabled in polylang
- 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
- Domain masking and wordpress
- WordPress Multisite with Wildcard Certificates not mapping correctly
- 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
- 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?
- Hide sub domain created for local CDN
- Development to production, how to move a development site from http + dev.example.com to a production site https + example.com?
- How to Setup 2 Domains on a Single WordPress (Regions Filter)?
- Migrating WordPress site from subdomain to subdirectory