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
- to perform the requested action wordpress needs to access your web server. please enter your ftp
- How to edit a wordpress plugin without break its update process
- Rewriting every url
- Is there a good plugin for an online booking system..? [closed]
- Automating deprecated call checks?
- How can I make my custom shortcode work in a Custom HTML Widget?
- post_id always wrong in plugin
- Which hook callback has priority if both plugin and theme use the same hook?
- Adding a form at the end of the content
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Creating a wordpress plugin where users can override templates
- How to use static flattr buttons
- Allow Facebook to preview posts before published
- Can I run multiple queries with $wpdb->prepare?
- Get Plugin Information from Multiple Sites Externally
- javascript onload calling a function of a plugin
- Multisite Widget/Content
- May i Use ShortCode in Template?
- Best way to hook a custom url?
- plugin ajax to external php file always return null
- Best way to modify a plugin with no hooks and no pluggable functions?
- Auto delete WordPress users according to time
- Theme and plugin install or update display error in localhost
- Multiple sites, multiple countries
- Theme my Login plugin, how to update fields
- Is there a plugin-log plugin? [closed]
- Create a navbar filter that filters by a custom field
- Advanced Custom Field DatePicker [closed]
- Polylang : Interverting languages after development [closed]
- How to set Noindex to all wordpress pages in a catergory?
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- WP_Query for custom post type and category_id not working
- Prevent plugin from intruding on wp-json posts api
- How do i get file_get_contents to work in wordpress
- Plugin Development – Functions or Hooks?
- What happens when WordPress memory limit is exceeded?
- Making that Admin Bar transparent or a blue color
- Use wp_upload_dir() correctly
- How can I automatically download all images from all imported posts, place them on my new host, and replace all the links
- Looking for a free quiz plugin which saves the candidates answers for review [closed]
- Allowing .rfa Files In Media Upload [duplicate]
- Some WordPress Posts are automatically becoming comments on other Posts
- What is the purpose of a companion plugin
- WordPress: Add custom add_filter for custom functions
- How to download and unpack / install plugins with templates when installing it
- Calling a class method instantiated by ajax call in wordpress [closed]
- Which Membership Plugins Allow Registered Users To Bookmark Posts? [closed]
- Per theme plugins?
- Calling PHP function with AJAX
- How to detect 404 url and make this link underline or change background color?
- Cron task gets removed from the schedule
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- Failed to load resource: the server responded with a status of 500 () post.php
- How to show private pages based on a user’s role?
- admin-ajax.php not working properly on subdomains
- wp_login_form() ignoring login_form action hook
- My plugin can’t see my files
- wordpress disable certain plugins for catagory?
- Call to a member function get_error_messages() on null [closed]
- Menu items’ links are not working properly and added images
- getpost content with all formatting for admin pages
- WordPress ultra slow if I click on posts?
- Variable scope in plugin outside loop [closed]
- Pagination in category
- Can Shopp Commercial Plugin be hacked to display radio buttons instead of Dropdowns? [closed]
- wp_update_post does not change post status from draft to publish, returns 1
- No way to add instagram in AddToAny Plugin?
- Open all PDF or docx link as iframe
- Ajax in wordpress [duplicate]
- How to code a wordpress page properly? Dashboard or unique Theme files or alternative?
- Split Million WordPress Post’s Into Multiple Database Server