Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

MySQL – WordPress Multisite Settings

Posted on December 30, 2015December 30, 2015 By David Kittell

Currently this is not an ideal process but will provide needed information.

First get a list of all of the site’s option tables. Typically the main/root site will be wp_options and sub-sequential sites will be wp_2_options, wp_3_options, etc.

# Show all options tables in database
show tables like '%options%';

The results should look similar to this:

wp_2_options
wp_4_options
wp_5_options
wp_6_options
wp_options

Once we have the tables we can create a query like below to get the active plugins and theme modifications, again not ideal

# Show all tables active plugins
SELECT
	(SELECT option_value FROM wp_2_options WHERE option_name='active_plugins') AS wp_2_options,
	(SELECT option_value FROM wp_4_options WHERE option_name='active_plugins') AS wp_4_options,
	(SELECT option_value FROM wp_5_options WHERE option_name='active_plugins') AS wp_5_options,
	(SELECT option_value FROM wp_6_options WHERE option_name='active_plugins') AS wp_6_options,
	(SELECT option_value FROM wp_options WHERE option_name='active_plugins') AS wp_options;

# Show all tables with Make theme modification    
SELECT
	(SELECT option_value FROM wp_2_options WHERE option_name='theme_mods_Make') AS wp_2_options,
	(SELECT option_value FROM wp_4_options WHERE option_name='theme_mods_Make') AS wp_4_options,
	(SELECT option_value FROM wp_5_options WHERE option_name='theme_mods_Make') AS wp_5_options,
	(SELECT option_value FROM wp_6_options WHERE option_name='theme_mods_Make') AS wp_6_options,
	(SELECT option_value FROM wp_options WHERE option_name='theme_mods_Make') AS wp_options;

The results should look similar to this:

a:16:{i:1;s:37:"disable-comments/disable-comments.php";i:2;s:45:"limit-login-attempts/limit-login-attempts.php";i:3;s:23:"make-plus/make-plus.php";i:4;s:41:"ninja-forms-conditionals/conditionals.php";i:5;s:49:"ninja-forms-front-end-editor/front-end-editor.php";i:6;s:37:"ninja-forms-multi-part/multi-part.php";i:7;s:43:"ninja-forms-save-progress/save-progress.php";i:8;s:39:"ninja-forms-style/ninja-forms-style.php";i:9;s:36:"ninja-forms-uploads/file-uploads.php";i:10;s:27:"ninja-forms/ninja-forms.php";i:11;s:48:"open-in-new-window-plugin/open_in_new_window.php";i:12;s:37:"password-protect-wordpress/plugin.php";i:13;s:43:"shortcodes-ultimate/shortcodes-ultimate.php";i:14;s:41:"wordpress-importer/wordpress-importer.php";i:15;s:24:"wordpress-seo/wp-seo.php";i:16;s:29:"wp-mail-smtp/wp_mail_smtp.php";}
a: 22: {
    s: 11: "header-text";
    s: 1: " ";
    s: 18: "header-show-search";
    i: 0;
    s: 12: "logo-regular";
    s: 78: "http://<logo URL>";
    s: 11: "footer-text";
    s: 102: "Copyright © 2015 All Rights Reserved.";
    s: 18: "footer-show-social";
    i: 0;
    s: 18: "nav_menu_locations";
    a: 1: {
        s: 7: "primary";
        i: 2;
    }
    s: 18: "footer-hide-credit";
    i: 1;
    s: 15: "hide-site-title";
    i: 1;
    s: 12: "hide-tagline";
    i: 1;
    s: 15: "font-site-title";
    s: 9: "Open Sans";
    s: 11: "font-header";
    s: 9: "Open Sans";
    s: 16: "font-header-size";
    i: 34;
    s: 16: "font-widget-size";
    i: 13;
    s: 14: "font-body-size";
    i: 14;
    s: 13: "color-primary";
    s: 7: "#666666";
    s: 23: "header-bar-border-color";
    s: 7: "#45a346";
    s: 27: "header-bar-background-color";
    s: 7: "#45a346";
    s: 13: "footer-layout";
    s: 1: "2";
    s: 17: "footer-text-color";
    s: 7: "#ffffff";
    s: 19: "footer-border-color";
    s: 7: "#45a346";
    s: 23: "footer-background-color";
    s: 7: "#45a346";
    s: 19: "footer-widget-areas";
    s: 1: "0";
}
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code MySQL SQL WordPress WordPress SQL

Post navigation

Previous post
Next post

Related Posts

Compare SQL column against another column

Posted on January 29, 2015October 26, 2015

In a recent effort to clean up duplicates in my contacts I came across a script to assist me. In my situation I have some contacts that have had the company name inserted as the first/last name. SELECT id, [Company], [Title], [First Name], [Middle Name], [Last Name] FROM [OutlookContacts] WHERE…

Read More

Distinct For Only One Column

Posted on October 10, 2013October 26, 2015

name sold_price ram 2000 shyam 3000 ram 4000 hari 50000 Want: name sold_price ram 2000 shyam 3000 hari 50000 Show first reference of ram SELECT name,sold_price FROM ( SELECT ID ,name ,sold_price ,ROW_NUMBER() OVER ( PARTITION BY name ORDER BY ID ) rn FROM shop ) a WHERE rn =…

Read More

Azure Red Hat – RHUI Update

Posted on December 27, 2016January 9, 2017

Most of the this script is based on the document “Red Hat Update Infrastructure (RHUI) for on-demand Red Hat Enterprise Linux VMs in Azure” at https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-linux-update-infrastructure-redhat?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json My change will first check if the update was already installed, if not it will follow the process to install See updates at: https://gitlab.com/Kittell-RedHat/AzureRepo/raw/master/AzureRedHatRepoUpdate.sh…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes