Multisite – Page 3

Using Global Product Images in WooCommerce Multisite

In this tutorial we’re going to talk about how to make WooCommerce display images from the main store (and we decide which store is going to be the main). The next question that you may have is how did that happen that you have the same products across different stores of your multisite network. And the reasons can be pretty much different, for example:

  • Probably you’re using WooCommerce Multisite as a multilingual solution, so basically you have the same stores with the same products but in different languages.
  • Or maybe you’re using my multisite crossposting plugin to publish your products to the other stores of your network.

And the whole idea of this tutorial is to prevent the product images from being duplicated to every sub-store uploads folders like /uploads/sites/2, /uploads/sites/3 and so on.

How to Create a Language Redirect in Multisite

Recently I got a request from my client and what she was needed is to automatically redirect users to a language-specific store within the WordPress multisite network depending on a customer IP address.

For example:

  • no.example.com – redirect customers here if they have a norwegian IP address,
  • dk.example.com – redirect customers here if they have a danish IP address,
  • example.com – let customers to stay on this website if there is no specific language website version for them (based on their IP again).

What is the easiest way to accomplish it?

Tapping into switch_to_blog() Function Performance

It just happened that in my WordPress-related work I focused mostly on WordPress Multisite. I had a couple of big client projects in the past, then I developed WordPress plugins for multisite specifically, for example this one or this another one and here we go.

So I have quite a picture in my mind how the things should work the best.

In this tutorial I am about to talk about switch_to_blog() function, especially about its usage within a loop:

  • How does it work exactly?
  • Is it slow?
  • Can we improve it somehow?

First of all let me show you a code snippet I am talking about.

Importing Products From Another WooCommerce Store

In this guide, I would like to talk about different ways how, in WooCommerce, to import products from another website. Specifically, we will take a look at two different approaches:

  1. using standard WooCommerce import and export tools,
  2. and using a plugin for that.

More than that, if you’re using a WooCommerce Multisite installation – in other words, your stores are a part of a single WordPress Multisite network, then a couple of more moments you will need to keep in mind as well, and we will uncover them in this tutorial later.

Add a Super Admin User in phpMyAdmin

Sometimes when you work with WordPress multisite network you may need to create a super administrator user not from the dashboard, but from the database with the help of SQL queries.

And in this tutorial I am about to show you how. There are actually only two steps we need to do:

How to Check if Plugin is Active in Multisite Network

When it comes to plugins installed on WordPress Multisite network, some of them can be activated either for the whole network or for a specific site of the network only.

Network activated plugin:

network activated plugins within a WordPress multisite network
When you “Network activate” a plugin, it will be automatically active for every site in your network. Yes, it sounds obvious, but just in case.

The same plugin is activated site-specific:

Site-specific plugin activation in WordPress Multisite

It shouldn’t be a problem to understand how it works, the problems could appear when we try to check whether a plugin is network or site-specifically activated in the code.

There are multiple ways to do that and each of them is quite different.

Multisite Product Sync for WooCommerce

Below, I will show you two ways of configuring WooCommerce multisite product sync between stores within a single WordPress multisite network – with the Simple Multisite Crossposting plugin and without any plugins as well.

But please keep an important thing in mind – if you’re not using your WooCommerce stores as part of a WordPress Multisite network (or maybe you’re just not exactly sure what it means), then check this article instead. Though the idea and the process will be similar in that case, the tools and functions in the code will be completely different.