5,233 GPL Products · Updated DailyPRO Versions Available · Instant Download
Native PHP Sessions 1.4.5 – WordPress Plugin

Native PHP Sessions

v1.4.5 ★★★★★4.9/5 (16) Updated 2 days ago Live Demo ↗
Download Native PHP Sessions 1.4.5
Free download · version 1.4.5

Description

At a glance

Native PHP Sessions v1.4.5 — free WordPress plugin download. Key facts: 10K+ active installs · 4.9/5 rating from 16 reviews · updated December 4, 2025 · requires WordPress 5.3+ & PHP 7.4+.

WordPress core does not use PHP sessions, but sometimes they are required by your use-case, a plugin or theme.

This plugin implements PHP’s native session handlers, backed by the WordPress database. This allows plugins, themes, and custom code to safely use PHP $_SESSIONs in a distributed environment where PHP’s default tempfile storage just won’t work.

Note that primary development is on GitHub if you would like to contribute:

https://github.com/pantheon-systems/wp-native-php-sessions

Configuration

By default the session lifetime is set to 0, which is until the browser is closed.

To override this use the pantheon_session_expiration filter before the Native PHP Sessions plugin is loaded. For example a small Must-use plugin (a.k.a. mu-plugin) could contain:

<?php
function my_session_expiration_override() {
    return 60*60*4; // 4 hours
}
add_filter( 'pantheon_session_expiration', 'my_session_expiration_override' );<h3>CLI Commands</h3>

wp pantheon session add-index

Added in 1.4.0. This command should be run if your installation of the plugin occurred before the addition of the primary ID key to the session table in version 1.2.2. You will be automatically notified when you visit any admin page if this is the case. If there’s no message, your version is good to go. Note that this command is non-destructive, a new table will be created and the existing one preserved in a backup state until you have verified that the upgrade is functioning as expected.

wp pantheon session primary-key-finalize

Added in 1.4.0. If you have run the add-index command and have verified that the new table is functioning correctly, running the primary-key-finalize command will perform a database cleanup and remove the backup table.

wp pantheon session primary-key-revert

Added in 1.4.0. If you have run the add-index command and something unexpected has occurred, just run the primary-key-revert command and the backup table will immediately be returned to being the active table.

WordPress Multisite

As of 1.4.2 the add-index, primary-key-add and primary-key-revert commands are fully multisite compatible.

Contributing

See CONTRIBUTING.md for information on contributing.

Troubleshooting

If you see an error like “Fatal error: session_start(): Failed to initialize storage module:” or “Warning: ini_set(): A session is active.”, then you likely have a plugin that is starting a session before WP Native PHP Sessions is loading.

To fix, create a new file at wp-content/mu-plugins/000-loader.php and include the following:

<?php
if (file_exists(WP_PLUGIN_DIR . '/wp-native-php-sessions/pantheon-sessions.php')) {
    require_once WP_PLUGIN_DIR . '/wp-native-php-sessions/pantheon-sessions.php';
}

This mu-plugin will load WP Native PHP Sessions before all other plugins, while letting you still use the WordPress plugin updater to keep the plugin up-to-date.

Frequently asked questions

What is Native PHP Sessions?

Native PHP Sessions is a free WordPress plugin available under the GPL license. The current version is 1.4.5. It is active on over 10K websites.

Is Native PHP Sessions free to download?

Yes — Native PHP Sessions 1.4.5 is a free GPL download with no hidden fees, no account needed, and no feature locked behind a paywall in this package. Users rate it 4.9 out of 5 based on 16 reviews.

How do I install Native PHP Sessions 1.4.5?

Download the ZIP file from this page, then in your WordPress dashboard go to Plugins → Add New → Upload Plugin, choose the file, click Install Now, then Activate. The plugin works immediately after activation — no license key or extra setup is required for the core features.

What are the requirements for Native PHP Sessions?

Native PHP Sessions 1.4.5 requires WordPress 5.3 or higher and PHP 7.4 or higher. Most modern WordPress hosts already meet these versions. Running older versions may cause features to break, so update WordPress and PHP first if your site is behind.

When was Native PHP Sessions last updated?

Version 1.4.5 was last updated on December 4, 2025. This page is refreshed automatically, so the download here always matches the newest version we have verified.

Is the Native PHP Sessions download safe?

The file is sourced directly from the official WordPress.org repository — the same file the developer published. It is served unmodified, so what you install here is byte-identical to the official release.

Version: 1.4.5
Updated: October 1, 2026

Technical details

Version1.4.5
Last updatedDecember 4, 2025
Active installs10,000+
Rating★★★★★ 4.9/5 (16 reviews)
Requires WordPress5.3 or higher
Requires PHP7.4 or higher
AuthorPantheon Systems
Tagscomments, sessions
Demo Native PHP Sessions

Download Native PHP Sessions

Download Native PHP Sessions WP Plugin

Official Page ↗

Note: if the download does not start, disable your ad blocker and try again.

Leave a Comment