root-relative links for multiple parked domains

I tracked the function calls in my theme (a child theme of Oenology by Chip Bennett) and wp-include that generate the links, found the home_url() function, and then wrote these functions for my site: function gregory_make_relative($url=””) { return preg_replace( ‘#^https?://[^/]+/#iu’, “https://wordpress.stackexchange.com/”, $url, 1 ); } add_filter( ‘home_url’, ‘gregory_make_relative’, 11, 1 ); I intentionally grep-searched to … Read more

How to use Multiple-Domains in one Multi-Site Installation?

As far as I know, Multi-Domains from WPMUDEV is the only plugin which works flawlessly with the lastest version of WordPress. It is BuddyPress compatible, has a single signon and even a multi-subdomain feature (blog1.subdomain.site.com, blog2.subdomain.site.com). There is a free alternative, but it has not been updated for the latest version of WordPress (the author … Read more

Multiple domains for multiple single installs

Serve both sites from the same installation. In your wp-config.php include the settings depending on $_SERVER[‘HTTP_HOST’]. Example for a complete wp-config.php: define( ‘DB_HOST’, ‘localhost’ ); define( ‘DB_CHARSET’, ‘utf8’ ); define( ‘DB_COLLATE’, ‘utf8_general_ci’ ); if ( ‘example.net’ === $_SERVER[‘HTTP_HOST’] ) // .net domain include ‘example.net.config.php’; elseif ( ‘example.com’ === $_SERVER[‘HTTP_HOST’] ) // .com domain include ‘example.com.config.php’; … Read more

How do I change site url to my new domain?

WordPress and some themes store configurations and URLs in serialized data, and the Search & Replace plugin does not handle those to correctly change a domain in the database. And don’t use simple SQL change queries in the database via adminer or phpmyadmin. A simple SQL query won’t correctly handle serialized data. See Moving WordPress … Read more