I have a WordPress plugin which keeps sending and retrieving data to its server. Is it possible to block url of plugin such as api.plugindata.com.

  • 2
    How is the plugin sending it? Is it using WP APIs or Curl or file_get_contents? Have you contacted the plugin author? What problem does doing this solve for you? Context is very important – Tom J Nowell Oct 23 '18 at 13:29

If you have access to your /etc/hosts file you can add



api.plugindata.com localhost

to route all traffic going to api.plugindata.com to your own machine.

If you don't have access to the file you can also search in the plugin source code where this domain occurs and either comment the code or maybe use a hook (if available) to prevent communicating.

| improve this answer | |

If the author of this plugin has not made this available by registering a filter or action hook, you can't do what you want without changing the plugin's source code, which will be overwritten with next update of the plugin.

If you are looking to block the url using server's settings, you should ask the question on ServerFault.

| improve this answer | |
  • 1
    Just to add: If the plugin authors use pluggable functions you can override those, e.g. via mu-plugins – kero Oct 23 '18 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.