Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

phpmyadmin, find all subdomain WordPress


first :
in phpmyadmin, I want to find all sites (in my multisite) which have a siteurl like
xxxxxxx could be everything
= I want to find all the subdomain of

second :
In php my admin, i want to remove all tables of all sites which are subdomains of
so all sites which have an URL like that :

Answers (4)


Just Me answers:

Select * FROM wp_blogs WHERE domain LIKE '';


akhilesh singh answers:

you can use these queries in your phpmyadmin

follow these steps before run these queries
1. take *backup of your tables first before run these queries
2. replace " PREFIX_ " with your wp prifix

1-for search.

Select * FROM PREFIX_blogs WHERE domain LIKE '';

2-for remove


Francisco Javier Carazo Gil answers:

Sébastien use it you can find and replace all subdomains to normal one.

Sébastien | French WordpressDesigner comments:

i don't need search and replace
1-I need search.
2-i need remove


Fahad Murtaza answers:

first The table wp_blogs is the one.

You can do the SQL with

Sébastien | French WordpressDesigner comments:

Ok but i have many many sites... so I need a request to display only the sites I want and a second request to remove all tables of this sites

with I display the subdomains of but I display too the sites which have in its content.
I want just the subdomains.

Fahad Murtaza comments:

Well if you do the search just in wp_blogs folder and only search on the field 'domain'. That solves the first problem.

Sébastien | French WordpressDesigner comments:

i need a request