How to use the Bitcoin and Altcoin Wallets plugin on multisite WordPress installations.
The instructions below are for installing Bitcoin and Altcoin Wallets versions before
6.0.0 on a multisite WordPress installation.
Since Bitcoin and Altcoin Wallets version
6.0.0, the multisite documentation is part of the built-in documentation for the plugin.
To learn about the plugin on multisite installations, in your WordPress admin screens, navigate to: Wallets Admin Docs → wallets → → Multisite.
The Multisite reference is also available on github.
2.2.3 of Bitcoin and Altcoin Wallets, the plugin has had support for multisite installations, and since version
2.4.0, the plugin has been able to be network-activated on multisite installations.
As of version
5.0.11, many (most?) of the bugs related to this feature have now been fixed! This means that you now have several options on how to use this plugin on your WordPress multisite installation.
Just so we’re on the same page, a multisite WordPress installation has a collection of sites, aka blogs. This collection of sites is called a network. The sites are managed by the network admin, or super admin, and each individual site has its own regular admin. Plugins can be installed and activated for the entire network by the network admin, or on each site individually, by the site admin. If you’re unsure about the terminology, check the Glossary on Multisite and Network.
For more background reading, see Create a Network.
Network-activate or not? Your choice!
On a WordPress network, users are entities that persist across sites, while the content (posts, pages, etc) is associated with individual sites.
Your first option is to install and activate the plugin via the Network Admin menu. This is what you get:
- Your users have one balance per coin, and one set of deposit addresses across all the sites on your network.
- All of the app extensions and coin adapters must also be network-activated.
- As a network admin, you will find the Wallets menu in the Network Admin screens. There will be no Wallets menu in the Admin Screens of individual sites.
- The options and coin adapter settings that you set, apply across all sites. Settings are stored in the
- All the sites on your network are backed by the same wallet for each coin.
- The transaction data and deposit addresses are stored in one set of tables on the MySQL DB. By default, these are
- If you are going to trigger the cron jobs via an external URL, there is one cron URL to trigger. The link is shown in the network admin menu, under Wallets → Cron job.
Your other option is to install the plugin, but not activate it for the network. Instead, each site administrator can choose to activate it at the site level. This is what you get:
- Your users will have a different balance per coin, and different deposit addresses, for each individual site where the plugin is activated.
- All of the app extensions and coin adapters must also be activated individually on each site they are to be used. They should not be network-activated.
- As a site admin, you will find the Wallets menu in the Site Admin screens. There will be no Wallets menu in the Network Admin screens.
- The options and coin adapter settings that you set, apply to each site individually. You can have different coin adapters on each site.
- The transaction data and deposit addresses for all sites are stored in one set of tables on the MySQL DB. By default, these are
wp_wallets_adds. Individual rows are marked with a
blog_idcolumn, ensuring data isolation between sites.
- If you are going to trigger the cron jobs via an external URL, you should trigger the cron on each site individually. The link is shown in the site admin menu, under Wallets → Cron job.
All sites backed by one set of wallets? Or each site backed by an individual wallet? Your choice.
If you decide to install the plugin individually on each site on your network (i.e. the plugin is NOT network-activated), you may still choose to use one wallet for each coin, rather than individual wallets for each coin and site. Simply set the coin adapter settings to be the same on each coin adapter installation. You can do this with any type of coin adapter. Some points to consider:
- Users will be assigned individual deposit addresses for each site. All of these addresses will be generated by, and belong to, the same wallet. This is not a problem: Incoming deposit transactions will be assigned to the appropriate site in each case.
- The Hot Wallet Balance that you see on your admin screen is there to back the Sum of User Balances for all the users across all your sites, not just the sum of balances on the site you have in front of you right now. Take this under consideration when calculating how much balance to keep online using the Cold Storage feature.
- In terms of security, it might be better to have a different wallet backing each site. This is also important if different admins are administering each network.