A wordpress plugin that creates a paywall for almost any wordpress content, payable in bitcoin over the lightning network
The files in the btcpaywall subdirectory of this git repository are the source code of the plugin. You can download the btcpaywall subdirectory, zip it, and upload it to your wordpress directory, or -- if you don't want to do the zipping -- you can download a prezipped version here:
Install and activate the plugin through the plugins page in the backend of your wordpress installation. Just select Add new and upload the zip file.Lnbits
After you install and activate BTC Paywall, but before you can use it, you'll have to connect it to an lnbits wallet. Lnbits is, among other things, an abstraction layer that allows programs built for bitcoin's lightning network to communicate in a standardized way with most popular lightning network implementations, such as clightning and lnd, as well as custodial lightning wallets like opennode, lnpay, and lntxbot. You can either self-host lnbits in order to do everything with minimized trust (see github.com/lnbits/lnbits for more details) or get a custodial lnbits wallet at lnbits.com.
To connect BTC Paywall to lnbits, use the BTCPaywall Settings menu. It is located in the backend of your wordpress website > Settings > BTC Paywall. Visit the Settings menu and take the url of your lnbits host as well as your wallet api key and add them to the settings menu of BTC Paywall. The hostname will be https://lnbits.com if that is the site you are using or, if you are self-hosting lnbits on the same server that hosts your wordpress site, it may be something like http://localhost:5000. As for your api key, obtain that by creating an lnbits wallet and looking at the righthand sidebar. "Invoice/read key" is the one you want.Syntax
Once the plugin is installed an...