Title: Coding sort order and settings
Last modified: August 30, 2016

---

# Coding sort order and settings

 *  [Deny Dias](https://wordpress.org/support/users/denydias/)
 * (@denydias)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/coding-sort-order-and-settings/)
 * Hi Jeff Sterup,
 * First things first: thank you very much for this beautiful piece of code. PO 
   is something really useful for the ones who cares about user experience, resource
   usage and performance.
 * With the help of others, we’re developing a whole new WordPress powered website
   to this small startup of mine. In that effort we have set different environments
   for development, staging and production. These environments are connected through
   a continuous integration process, so the changes in dev only goes to production
   if tests goes fine in staging.
 * In that process, we sometimes need to destroy the development environment and
   start over. This is when something annoying comes to PO: on every new environment,
   we have to manually set the plugins order in Group And Order Plugins page. This
   is quite tedious.
 * I wonder if we could automate that. If yes, than that code goes under VCS so 
   other developers just pull, run and bang! Plugins are in the order they should
   be. The same would be nice for the PO settings.
 * By digging into PO’s code and DB I found that the plugin order is stored in wp_options.
   option_name.PO_plugin_order. However, by editing its content by hand do not change
   the order in the page, so I think that there must be something bit of data to
   change so this could work.
 * Thank you for any piece of advice on this, although it’s not related at all with
   PO’s main functionality.
 * [https://wordpress.org/plugins/plugin-organizer/](https://wordpress.org/plugins/plugin-organizer/)

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

 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/coding-sort-order-and-settings/#post-6625903)
 * Copying that option to the new table should reorder your plugins if you go to
   the Group And Order plugins page. Plugin Organizer changes the order of the array
   that wordpress uses to load your plugins. It is stored in wp_options.option_name.
   active_plugins. wp_options.option_name.PO_plugin_order is used to keep the order
   in case something else changes it. I just tested this and it works. If it isn’t
   working for you you can try copying both of those options. If there are plugins
   active on the test site that are not active on the live site, copying the active_plugins
   option to the live site will activate them. Same goes for inactive plugins. It
   will deactivate any plugins that aren’t active on the test site.
 *  Thread Starter [Deny Dias](https://wordpress.org/support/users/denydias/)
 * (@denydias)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/coding-sort-order-and-settings/#post-6625928)
 * Really, Jeff! Now that’s weird! I tried the same you did more than once and it
   doesn’t worked for me. I’m gonna try that again when they appear out of order
   and let you know here the results.
 * Thank you for the quick reply.
 *  Thread Starter [Deny Dias](https://wordpress.org/support/users/denydias/)
 * (@denydias)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/coding-sort-order-and-settings/#post-6626151)
 * Hi Jeff,
 * Just to let you know that plugin reordering via database works only when changing`
   wp_options.option_name.active_plugins`. If one change `wp_options.option_name.
   PO_plugin_order` only, the Group And Order plugins page will not reflect the 
   desired ordering.
 * Maybe PO is looking for the ordering from `wp_options.option_name.active_plugins`
   only and ignoring what is set at `wp_options.option_name.PO_plugin_order`?

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

The topic ‘Coding sort order and settings’ is closed to new replies.

 * ![](https://ps.w.org/plugin-organizer/assets/icon-256x256.png?rev=1786554)
 * [Plugin Organizer](https://wordpress.org/plugins/plugin-organizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/plugin-organizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/plugin-organizer/)
 * [Active Topics](https://wordpress.org/support/plugin/plugin-organizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/plugin-organizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/plugin-organizer/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [manual](https://wordpress.org/support/topic-tag/manual/)
 * [order](https://wordpress.org/support/topic-tag/order/)
 * [reuse](https://wordpress.org/support/topic-tag/reuse/)

 * 3 replies
 * 2 participants
 * Last reply from: [Deny Dias](https://wordpress.org/support/users/denydias/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/coding-sort-order-and-settings/#post-6626151)
 * Status: not resolved