Wordpress

Finding used themes in wordpress mu

2012-10-15 Bertas Wordpress

I’m responsible for one blog farm, which are running on wordpress mu, and we needed to find what themes are used in order to remove not used.

In our setup there is one database and a lot of tables. Theme name, used for blog is stored in options table. It’s simple to find theme used in one blog:

SELECT option_value FROM wp_20_options WHERE option_name='current_theme';

If we need to find themes used in couple blogs it is quite easy too:

(SELECT option_value FROM wp_20_options WHERE option_name='current_theme') UNION 
(SELECT option_value FROM wp_21_options WHERE option_name='current_theme') UNION 
(SELECT option_value FROM wp_26_options WHERE option_name='current_theme');

But we have 1500 options tables….

(more…)

0

Powered by WordPress. Designed by elogi.