You could use a combination of the file content and the domain to create a unique hash.
Example:
$md5 = md5( file_get_contents( __FILE__ ) . $_SERVER['HTTP_HOST'] );
if ( 'be5d38f32a5d4a897e6c878f0c2f1b14' !== $md5 )
deactivate_plugins( plugin_basename( __FILE__ ) );
Additionally, you could check each week per remote request to your server, if the hash is registered for that domain.
But be aware, this can be changed very easily. There is just no way enforce a domain.
Related Posts:
- Open Source plugin and requires licence
- How to transfer a WordPress blog to a different domain?
- GPL and plugins
- Create plugin with 3rd party MIT license code
- Does releasing a plugin under the AGPL force people to open source their whole WordPress installation?
- Licensing: Can I include SWFs without source in a plugin released on wordpress.org?
- Licensing of freemium plugin
- Is license need for free wordpress plugin
- Best way to maintain and update 3rd-party WP plugin when developer is unresponsive?
- Multiple domains issue
- Can I put in Github the code of a abandoned plugin I want to fork?
- Can I use Symfony components in a plugin that I want to submit to the WordPress plugin repository?
- Custom license for WordPress plugin
- Is it fair to use MIT licensed code in WordPress plugins? [closed]
- Migrating WordPress – New domain entry, links broken
- Can i legally remove a credit from a free plugin on wordpress.org? [closed]
- Licensing options for WordPress Plugins
- How do I convert my WordPress website to be domain agnostic?
- Licensing a Plugin [closed]
- Single Domain/Multiple Domain installation restrictions allowed for plugins?
- How come W3TC is allowed to host premium code in the WordPress repo?
- best way to handle subscriptions with a licence?
- Team member plugin problem after changing to another hosting
- How set role at registration based on email?
- WordPress internationalization + domains
- Modify plugin and submit to directory
- Plugin with custom domain
- From a legal perspective, is it okay to customize a plugin’s code?
- How to Replicate Elementor Licensing Model
- Need a WordPress license manager plugin
- Plugin licensing behind a load-balancer
- get_users(); Is an Undefined Function When Used in Cron Job
- Alternate email sending service – eg: AWS SES [closed]
- 5 PHP Fatal error: Uncaught ArgumentCountError (Cannot Find)
- Disabling a plugin lead to styles being shown as plain text
- the_content() printing DOCTYPE, and tags in the middle of page
- How to deal with Slow HTTP POST (slowloris) vulnerability
- How to create author profile showcase in wordpress
- What is the purpose of WP_CONTENT_URL?
- Blog previews on custom page with more buttons
- Order posts by meta key ( Using ACF )
- Control page content visibility based on URL parameter
- Where does MonsterInsights put Google Analytics code?
- WooCommerce Shopping Cart Not Initially Showing Products [closed]
- Elementor Custom Control: How to get input value?
- Elementor page builder plugin not loading up all the way? [closed]
- How to add fields in the WordPress editor?
- How can I fetch data from another website to my wordpress website with mysql database
- Sucuri SiteCheck failing on domain with iThemes Security Pro plugin
- How to translate WP Blog (search, category etc.)?
- WordPress SVN UTF-8 issue
- How can I concatenate variables to search results title? [closed]
- Search Results Page filter by page title
- Activate and deactivate plugin automatically
- WooCommerce: after install hook
- Test my WordPress Plugin standard or not
- Theme My Login Shortcode Doesn’t Return Anything
- How retreive saved data from gravity forms in my template?
- is_rtl returns false while it should return true
- issue in wp_localize_script
- Import MS-Access data file to make the searchable page
- License validate function
- Sanitize $_GET variable when comparing
- Include Minit plugin in theme [closed]
- Plugin for an interactive image? [closed]
- Where can I save plugin data?
- echo get_option in header template
- How to display all functions (hooks, filters, or custom php) used on a page inline
- wp_enqueue_style on template_redirect level?
- Plugin not working & permalink erorr after upgrade to php 7x on Nginx
- Clear out old images, any advice?
- problem with sql query
- Access post title from custom meta box on title change
- How to add a new column with text fields to WooCommerce Cart List?
- How to use filter to disable adding a product to wishlist?
- Running multiple security plugins
- Save user total active time after login in wordpress [closed]
- add_query_arg not work in admin
- Add a “View all” button on WooCommerce product archives pages
- Opening a JQuery modal window on click of a button with a JQuery plugin
- I am trying to make a field show and save from quickedit screen
- Merge tags in multistep Gravity Form?
- Add to array, redirect and display
- How to track analytics with a WordPress site under the same domain as my main site?
- Can I clone plugin folder to another directory so that I don’t have to reinstall them?
- correctness of URL
- Woocommerce: limit user to see only the products he created
- Woocommerce singe product custom gallery output works just on the first slide
- how do I secure my WP website from hackers? [closed]
- How do I set up XAMPP to allow me to download plugins and themes?
- How can I load the css and jquery explicitly for the login screen
- Overriding an Array in a Plugin’s Class/Function from functions.php
- wp_redirect doen’t work
- Canvas | Bouncing balls within a container (with gravity and collisions and background-images on the balls)
- Plugin translation not working on WordPress.org
- PHP if statement with German umlauts [closed]
- Send email with list of active plugins upon activation/deactivation
- OceanWP settings are missing from Add New Post [closed]
- Built a second plugin but it overwrote the first one
- WordPress gtag.js with User ID tracking