Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jose

    (@giuse)

    Hi @countrypark

    As a default it’s possible, but only with standard WordPress rest API that includes wp-json in the URL

    If you need to disable plugins with non-standard rest APIs that call URLs that don’t include wp-json, you need to add this line in wp-config.php before the comment /* That’s all, stop editing! Happy blogging. */:

    define( 'EOS_DP_ALLOW_POST',true );

    In this case, check all the actions that you can do on your website (submitting a form, adding a product to the cart…).

    In both cases, you can use the settings Custom URLs => Frontend URLs

    In the first case you can add something that looks like */wp-json/wp/v2/sample-parameter*.
    For non-standard REST APIs add something that matches your URLs.

    Let me know if it’s not clear.

    Thread Starter CountrySide

    (@countrypark)

    Hi, thanks for the info, I will forward this to the app developer.

    Thread Starter CountrySide

    (@countrypark)

    where would the option for disabling certain plugins for REST API be in the plugin?

    Thread Starter CountrySide

    (@countrypark)

    To clarify, I don’t want to disable plugins that use REST API, I have an app that connects to the site with REST API and was wondering if it’s possible to disable other apps from slowing down the REST API requests by disabling those apps from the REST APi requests of my app.

    Plugin Author Jose

    (@giuse)

    Freesoul Deactivate Plugins => Settings => Custom URLs => Frontend URLs

    If your app calls for example https://yourdomain.com/wp-json/wp/v2/pages

    you go to Custom URLs => Frontend URLs, you add a row with */wp-json/wp/v2/pages*, and disable the plugins that you don’t want they run when the app calls https://yourdomain.com/wp-json/wp/v2/pages

    @countrypark

    Thread Starter CountrySide

    (@countrypark)

    Hi, I’m reffering to this on this article: https://wp-qa.com/wordpress-rest-api-slow-response-time

    Overview: So the issue is a limitation of WordPress as of version 4.8. WordPress is designed to load plugins and themes and all of its core every REST API request. Here is the reason for the slow response time.

    Thread Starter CountrySide

    (@countrypark)

    does your last response apply to this?

    Plugin Author Jose

    (@giuse)

    Hi @countrypark
    yes, it does. The core of WordPress will and the theme still load. You can only disable the plugins.

    I will close this thread. If you have any issues and still need help don’t hesitate to open it again and reply.

    Thread Starter CountrySide

    (@countrypark)

    Thank you

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Deactivate Plugins for REST API’ is closed to new replies.