Configuring multi-site with domain mapping

I solved this without using a Domain Mapping plugin. Most of these features assume that you’re running your WordPress blog farm on the same website. To solve this I employed two solutions using IIS’s Application Request Routing module to reverse proxy /blog on each site to the matching WordPress site. I then rewrote the outbound … Read more

Can you manage multiple domain names from a single WordPress multisite network?

If the real question is: can you manage multiple domain names from a single WordPress multisite network, then the answer is yes. But you’ve over-specified your restrictions such that the question is no longer answerable. A WordPress multisite network – either as a subdomain (site1.example.com) or subdirectory (example.com/site1) install will allow you to manage core, … Read more

Optimizing Query used for a Shortcode

I see a few things that you might try to shortcut things: Currently a Multisite network only allows one site ID, according to the Codex page for $wpdb->siteid. Also, the site ID is defined in your wp-config.php file as a constant, BLOG_ID_CURRENT_SITE. So any reference to $wpdb->siteid can be replaced by BLOG_ID_CURRENT_SITE. Look into the … Read more

Multi-site get_bloginfo(‘stylesheet_directory’) referring to sub-folder

Okay I avoided the lazy way out =) For others that have my particular site requirements, here’s my workaround, of simply creating my own custom method in functions.php: function mysite_get_theme_directory_uri() { // chop up the url from get_stylesheet directory $parsedUrl = parse_url(get_stylesheet_directory_uri()); // chop up the ‘path’ index value $path = $parsedUrl[‘path’]; // make it … Read more

Redirect & permalink problems after moving multisite to a new server

Well, the answer has several different ways.. ==Method 1== (when you want your website permalinks to become like example.com/wp/smth ) if so, just change this: RewriteBase / to RewriteBase /wp and in database, change all occurrences of example.com/ to example.com/wp/ ==Method 2== (when you want your website permalinks to remain example.com/smth ) Now you have … Read more

API for creating blogs on Multisite?

I ended up creating one myself. I’m not sure if the new wordpress rest API contains functionality that duplicates this so you may want to investigate that first. https://github.com/remkade/multisite-json-api

Site not found using subdomains

This is a DNS problem, not WordPress. ping test.onlinebanter.co.uk displays unknown host. WordPress does not even handle the requests because the client is unable to determine the IP address of the server and therefore does not send the HTTP request. ping www.onlinebanter.co.uk works, so I assume the name server did not properly store the DNS … Read more

error code: 521