• Does site search in network admin work when WP is using a custom table prefix?

    Background: I have several networks set up on the same server. They are subdomain installs and have WordPress MU Domain Mapping network activated. One network uses Hyper DB, the other does not. The network with Hyper DB uses a custom table prefix; the other network uses the standard wp_ prefix.

    For the Hyper DB/custom prefix network, the “search sites” function from the Sites network admin menu choice does NOT work; it never finds anything, even if the entire site name is searched. For the other network, with no Hyper DB and standard prefix, site search works as expected. I know about using the * wildcard character, so that’s not the issue.

    I have matched activated plugins and other settings and narrowed it down to these 2 differences, Hyper DB and table prefix. Since I doubt Hyper DB is the culprit, can anyone confirm that site search works with a custom prefix?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    It should.

    WP only knows what it’s prefix is from your wp-config.php, and lots of people have custom ones.

    Thread Starter frisco

    (@frisco)

    I’ve found the problem. Ipstenu (of course) was right. Custom prefixes work fine.

    However, what breaks site search is having DOMAIN_CURRENT_SITE set to include www on a subdomain install. When DOMAIN_CURRENT_SITE includes www, a search for ab* produces a SQL search that looks for the domain ab%.www.mydomain.com, which is not how the domain is stored in the blogs table.

    Perhaps it should be better documented that the main site on a subdomain install should not include www if site search is important?

    In my case, site search from the dashboard is important, so I’m off to fix this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Site search with custom prefix’ is closed to new replies.