Skip to content

Enabling PHP sessions in WordPress

March 7, 2012

When running an advertising campaign on The Business Octopus website we wanted to present a unique contact telephone number to customers to help us to track successful calls generated by the campaign.

This number needed to follow the customer around the site but only for as long as their current browser session. The most obvious PHP solution for this was to use a Session, I wanted to avoid using cookies if possible.

So that’s easy right? Not in WordPress! They are disabled by default! Agh!

After a lot of unsuccessful Googling where I was told to change various .htaccess settings (which did not work for me as our server is Windows hosted rather than Apache, I know, I know) and repeatedly told there was no default setting or plugin for this.

But there is! It’s called WordPress Session Enabler and it works a treat, download, activate and play with sessions in WordPress to your hearts content.

Hopefully this will save somebody some time.

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s