Title: Disable POST processing
Last modified: August 30, 2016

---

# Disable POST processing

 *  Resolved [lordandy1984](https://wordpress.org/support/users/lordandy1984/)
 * (@lordandy1984)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/disable-post-processing/)
 * Hi,
    i’ve a high load wordpress instance, and it seems the pretty link functions
   are even triggered for POST requests (e.g. /wp-admin/admin-ajax.php), which increases
   MySQL load.
 * So with hundreds of parallel users every ajax call is resulting in additional
   pretty-link-calls on the database.
 * It would be greate to have a filter hook to disable processing of POST requests
   at all, if only pretty link functions are used without any advanced tracking.
 * I just added the following snippet in the function `prli_redirect()` in the file
   prli-main.php to disable processing of POST requests:
 *     ```
       if($_SERVER["REQUEST_METHOD"] != 'GET')
           return;
       ```
   
 * Here are some Samples of the calls BEFORE this change:
 *     ```
       443355 Query  SHOW FULL COLUMNS FROM <code>wpexample_wfBlocks</code>
       443354 Query  select blockedTime, reason from wpexample_wfBlocks where IP='xxx' and (permanent=1 OR (blockedTime + '300' > unix_timestamp()))
       443355 Query  select blockedTime, reason from wpexample_wfBlocks where IP='xxx' and (permanent=1 OR (blockedTime + '300' > unix_timestamp()))
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
       ```
   
 * [https://wordpress.org/plugins/pretty-link/](https://wordpress.org/plugins/pretty-link/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [cartpauj](https://wordpress.org/support/users/cartpauj/)
 * (@cartpauj)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/disable-post-processing/#post-6799884)
 * Try switching the redirect method to “template_redirect” instead of “init” and
   see if that helps.
 *  Thread Starter [lordandy1984](https://wordpress.org/support/users/lordandy1984/)
 * (@lordandy1984)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/disable-post-processing/#post-6799901)
 * Thanks, this seem to not redirect POST requests any more.
 *  Plugin Author [cartpauj](https://wordpress.org/support/users/cartpauj/)
 * (@cartpauj)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/disable-post-processing/#post-6799965)
 * Thanks for letting me know. We’ll still make this change for GET requests in 
   future releases as well.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Disable POST processing’ is closed to new replies.

 * ![](https://ps.w.org/pretty-link/assets/icon-256x256.png?rev=2503434)
 * [PrettyLinks - Affiliate Links, Link Branding, Link Tracking, Marketing and Stripe Payments Plugin](https://wordpress.org/plugins/pretty-link/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pretty-link/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pretty-link/)
 * [Active Topics](https://wordpress.org/support/plugin/pretty-link/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pretty-link/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pretty-link/reviews/)

## Tags

 * [post](https://wordpress.org/support/topic-tag/post/)

 * 3 replies
 * 2 participants
 * Last reply from: [cartpauj](https://wordpress.org/support/users/cartpauj/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/disable-post-processing/#post-6799965)
 * Status: resolved