• Resolved hemasusi

    (@hemasusi)


    Hi,

    I recently saw the notice in WP dashboard, that run below command to add index to the session tables.

    terminus wp <site>.<env> — pantheon session add-index

    So, i ran the command using terminal in DEV portal. After that, seen another message.

    An old version of the PHP Native Sessions table is detected. When testing is complete, run terminus wp . — pantheon session primary-key-finalize to clean up old data, or run terminus wp . — pantheon session primary-key-revert if there were issues.

    Then again run the primary key finalize command. Then all notices gone.

    Is there any impact in the database datas? We can safely run these commands in live server also ???

Viewing 1 replies (of 1 total)
  • Plugin Contributor jazzs3quence

    (@jazzs3quence)

    Hi @hemasusi!

    The operation is, as you’ve observed, in two parts: one renames the existing WP Native PHP Sessions tables and copies the data into new ones that are indexed. This is so you can run any tests you want/need to ensure the site continues to work as normal. The second part removes these duplicated tables as they are no longer needed. If during the process you find issues, you can run the primary-key-revert command to restore the old (un-indexed) tables.

    The commands do not affect any other WordPress database tables. They only affect the ones created and used by the WP Native PHP Sessions plugin. The steps are broken out deliberately to allow time to test and ensure that your site continues to operate as normal after the new indexed tables are created. The only functionality that might be affected by the process is any behavior around user sessions that you may be using the plugin for.

    So, yes, it is safe to run the same steps on your live environment. I would recommend running the initial command, testing the behavior, and then run the finalize command to clean up the database once you are sure that everything is working normally. There does not need to be any rush to finalize if you want to take more time to test as that is just deleting tables that are no longer in use.

Viewing 1 replies (of 1 total)
  • The topic ‘WP Native PHP session add index’ is closed to new replies.