Title: Please fix: PHP session never closed
Last modified: September 21, 2026

---

# Please fix: PHP session never closed

 *  Resolved [airflo](https://wordpress.org/support/users/airflo/)
 * (@airflo)
 * [1 week, 3 days ago](https://wordpress.org/support/topic/please-fix-php-session-never-closed/)
 * Hello team,
 * as mentioned by olessol half a year ago ([https://wordpress.org/support/topic/an-active-php-session-was-detected-34/](https://wordpress.org/support/topic/an-active-php-session-was-detected-34/)),
   there is an issue with an opened PHP session that is never closed. He even proposed
   a fix. You marked the entry as solved, but didn’t ship a fix 3 months ago with
   the latest version.
 * Leaving a PHP session open can adversely affect REST API and loopback calls due
   to session file lock. Please add `session_write_close()` to your code to close
   the session at an appropriate time, or use olessol’s suggestion `session_start(['
   read_and_close' => true])` if this doesn’t break your code.
 * Kind regards,
 * Florian

Viewing 1 replies (of 1 total)

 *  Plugin Support [Robert Fortaleza](https://wordpress.org/support/users/robfrtlz/)
 * (@robfrtlz)
 * [1 week, 3 days ago](https://wordpress.org/support/topic/please-fix-php-session-never-closed/#post-19025865)
 * Good day, [@airflo](https://wordpress.org/support/users/airflo/),
 * Thank you for following up on this and for bringing the previous report to our
   attention.
 * We’ve escalated this issue to our development team for further investigation.
   They will review how the PHP session is being handled and determine the appropriate
   fix to ensure it doesn’t interfere with REST API or loopback requests.
 * We appreciate you taking the time to report this and for providing the suggested
   solutions. We’ll work on getting this addressed in a future update.

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplease-fix-php-session-never-closed%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/premmerce-woocommerce-wholesale-pricing/assets/icon-256x256.
   png?rev=1840685)
 * [Premmerce Wholesale Pricing for WooCommerce](https://wordpress.org/plugins/premmerce-woocommerce-wholesale-pricing/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/premmerce-woocommerce-wholesale-pricing/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/premmerce-woocommerce-wholesale-pricing/)
 * [Active Topics](https://wordpress.org/support/plugin/premmerce-woocommerce-wholesale-pricing/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/premmerce-woocommerce-wholesale-pricing/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/premmerce-woocommerce-wholesale-pricing/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Robert Fortaleza](https://wordpress.org/support/users/robfrtlz/)
 * Last activity: [1 week, 3 days ago](https://wordpress.org/support/topic/please-fix-php-session-never-closed/#post-19025865)
 * Status: resolved