Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Wondering if there's a way to edit our search.php or .htaccess or function.php (or anything else...) so that our search function on our main site ( includes the subdomain of

Any thoughts or suggestions are appreciated it..

share|improve this question
Your search function would have to access WordPress's database, which certainly is possible, but I don't think I can give real answer without more information. – s_ha_dum Feb 1 '13 at 21:42
Thank you for your input - what sort of information would you need? I believe there are currently two wordpress databases set up (done by someone else) - one for the main site, one for the blog. I do have the database name/users/pw for both if needed? – E P Feb 4 '13 at 19:36
Are both sites WordPress? What does search.php look like? How good are you at SQL and PHP? – s_ha_dum Feb 4 '13 at 19:39
Yes - both sites are Wordpress. – E P Feb 4 '13 at 21:02
Please put code in your question, not as download/zip on an external resource. – kaiser Feb 18 '14 at 3:46

1 Answer 1

If you transform your main website's Wordpress into a multi-site environment, you can move to be a network site.

Once you do this, you could use the Multisite Global Search plugin to add a widget that searches all network sites.

It would be easy to move your standalone to a network site:

  1. export the content from,
  2. create a subdomain Wordpress network on your main website,
  3. edit your settings (Settings > General) to change the site and Wordpress URL to,
  4. rename your subdomain blog to blog2 in cPanel,
  5. create a network site called
  6. import the content you exported earlier.


PS - You'd need to copy any themes and plugins you have on into the main Wordpress installation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.