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
- Having Multiple authors for the same WordPress Plugin
- How can a plugin run a script after being updated in MultiSite?
- File Storage Plugin (For Individual Users)?
- Recommendationf for Quiz Plugin that saves results [closed]
- shortcode doesn’t work
- Will WordPress username displayed somewhere in the site?
- Events plugin for theater (event = performance of a production)
- What are the benefit in adding hook in the init() hook?
- upgrade plugin in wordpress
- Are Drop-ins harmful for wordpress website?
- WordPress URL redirect
- Is it dangerous to install unupdated plugins?
- Where to hook my plugin’s action
- load_theme_textdomain path
- Getting selected (highlighted) html from the Visual Editor on Edit Post page?
- How to query the custom fields by language?
- How to update plugins with database updates if I use svn
- Any recommendation on how to manage ads?
- List taxonomy terms for post as checkboxes
- Plugins not showing in Multisite dashboard
- How to create an archive page (with links) for a date range?
- Why WordPress plugin url ajax doesn’t work?
- Why Is This Code Causing The Admin Bar to Disappear?
- WordPress stripping away backslashes from HTML
- How to add wp visual editor in a custom widget?
- Plugin for users to create their own ads like Google Adsence
- Is there a PressThis that doesn’t hotlink?
- bbPress plugin: forum lists not showing in correct order? [closed]
- Plugin generated taxonomies’ permalinks with custom placeholders
- How do I find out what is in control over a certain part of a website?
- Is there a best practice remediation for PhpStorm’s warning that void function the_post_thumbnail is used?
- ‘Organize Series Plugin’ as muti author feature
- Suggestions for Dressing up blog for the holidays
- Prevent direct access to WordPress plugin assets?
- Allow only Admin role to access plugin settings/options page
- How to reset the plugins without deactivate the plugin
- plugins_url() works everywhere but wp_reqister_script()
- Better WP Security : dashboard doesn’t work any more
- show my own admin_notices after a post has been published
- Play videos with buffering in my server
- Custom form not showing in correct place on page
- WooCommerce Hiding A Certain Category From Being Displayed On Single Product
- Editable select options in quick edit OR in plugin settings
- Send Array from JS to php file then insert it in wp database through a plugin
- Offer Download Links for Product Images
- How to override Plugin javascript function : $(‘body’).on(‘change’,’.class’)
- Connect / Login WordPress Hosted Website or Blog with NodeJs
- Copy/paste local images not working in WordPress
- insert data from textbox to database
- How to change the WordPress Plugin Watson Assistant Chatbot BOX Size?
- White Screen of Death
- Creating one user access account for all the multiple sites
- How to fix blog article view and share #’s?
- Is it possible to “include” another wordpress post/page?
- WordPress SSO SAML
- Modify Plugin shortcode function code
- Attachments plugin cannot click media library button [closed]
- Is there any hook to change media html in post? [duplicate]
- Creating a user ‘add custom field’ section
- WordPress Settings – Custom Button actions
- Javascript not working
- Links on FAQ page aren’t working
- How to show post attachment image
- How can I make the Twitter Tools plugin hyperlink every link?
- Extra Text in Home URL
- Auto-scroll to beginning of accordion item
- A splash page on landing page
- I cannot login after installing the wp-login timeout setting plugin
- How to trigger plugin migration code when plugin updates?
- WP galleries in posts after import. How do I do it?