wp_get_attachment_image_src multisite issue

Some of the more archaic code is still present in WordPress, notably globalising variables inside functions. A good example of thise is get_current_blog_id(), which is present in wp-load.php: /** * Retrieve the current blog ID. * * @since 3.1.0 * * @global int $blog_id * * @return int Blog id */ function get_current_blog_id() { global … Read more

MU domain mapping login issue

Ensure sunrise.php is in the wp-content directory and that you have defined the following in wp-config.php: define( ‘SUNRISE’, ‘on’ ); With sunrise on, you should not define COOKIE_DOMAIN anywhere else as it handles that dynamically on all mapped domains. My guess is that either you don’t have define( ‘SUNRISE’, ‘on’ ); or you don’t have … Read more

Does the WordPress API work with multisite?

Yes, the REST API is in the same location, just append /wp-json to the end of a site/blogs URL and there it is As for the network admin, at the moment there are no endpoints explicitly for multisite, so you can’t use the REST API to create and destroy sites without building those endpoints yourself, … Read more

Running several WordPress sites on same core / plugins?

Yes, it is possible. You can setup subdomains sites like this: subdomain1.domain.com, subdomains2.domain.com. Then, after you setup the network, use a domain mapping plugin to setup a domain name for each of them. subdomain1.domain.com becomes domain1.com, subdomain2.domain.com becomes domain2.com, etc. There are several domain mapping plugins out there: http://premium.wpmudev.org/project/domain-mapping (the one I would recommend, but … Read more

Multisite behind Varnish

I found a fix here: http://core.trac.wordpress.org/ticket/15936 You basically need to modify wp-includes/ms-settings.php like this (remove ‘-‘ lines; add the ‘+’ line): @@ -26,18 +26,8 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) { + $_SERVER[‘HTTP_HOST’] = preg_replace( ‘|:\d+$|’, ”, $_SERVER[‘HTTP_HOST’] ); $domain = addslashes( $_SERVER[‘HTTP_HOST’] ); – if ( false !== strpos( … Read more

Multisite – sub-subfolders for certain blogs

In order to do partition your blogs like this you’re going to need to write a custom plugin similar to the WordPress MU Domain Mapping plugin. Here’s how your plugin needs to work. Create a sunrise.php file for your plugin, and properly define(‘SUNRISE’,true); in your wp-config.php file. Create a table which maps the tuples {blog_slug, … Read more

Mega WordPress Applications WPMU or otherwise

Let’s see how many use cases I can come up with in 20 seconds (grin) School and university sites where every student gets a blog Community sites (BuddyPress) where every member gets a blog (i.e. Dieting sites like SparkPeople.com) News organizations where the many personalities get a blog (i.e. CBS, CNN, etc.) Businesses trying to … Read more

How to upload images manually to wordpress?

I haven’t tested this in multi-site but can’t see any reason that it wouldn’t work. The Add from Server plugin searches for images that you manually upload to WordPress and adds them to the media manager. You can find it here: http://wordpress.org/extend/plugins/add-from-server/ Tested on the latest WordPress.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)