AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

Bots and Crawlers

3 Posts
2 Users
0 Reactions
244 Views
Posts: 87
Topic starter
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@hbk747)
Estimable Member
Joined: 3 years ago
[#73287]

Hello wpForo team,

I run the forum at https://www.paradigmshift.com.pk/community-forum/ and need help with server load caused by two kinds of forum URLs.

The problem
Bots and crawlers repeatedly request URLs containing ?foro=allread and filter= query strings. My server's PHP slow log shows each of these requests taking 15–30 seconds of PHP execution (up to 30.5 s), across many URL variants. Because they're dynamic and uncacheable, they tie up PHP-FPM workers and have caused repeated CPU spikes to around 200%, at times making the site inaccessible.

What I've ruled out
- The forum's own pages are excluded from my page cache (FlyingPress), and wpForo's cache is enabled.
- My hosting provider (Cloudways, Lightning/NGINX stack, managed Cloudflare Enterprise) can't add custom WAF rules for specific query strings or user agents, so I can't block this at the edge.
- Most of the traffic comes from automated user agents (curl, python and fake Googlebot), not from real members.

My questions
1. Why are foro=allread and filter= requests so expensive, and can they be made lighter (for example through caching, query optimisation or a setting)?
2. Can these actions be disabled or restricted for guests and non-logged-in visitors, so only members can trigger "mark all read" and filtering?
3. Can wpForo add rel="nofollow" to these links, and/or noindex to the resulting pages, so search engines and crawlers don't follow them?
4. Is there a recommended way, such as a hook or filter, to reject these requests early for bots before wpForo does the heavy work?

Environment
- WordPress with wpForo on Cloudways (2 vCPU / 4 GB RAM, PHP-FPM, NGINX-only Lightning stack)
- Object Cache Pro (Redis), ElasticPress, FlyingPress and Shield Security
- Cloudflare Enterprise in front of the site

I can share slow-log excerpts or example URLs if that would help.

Thank you,
Sarmad
Paradigm Shift (paradigmshift.com.pk)


2 Replies
2 Replies
wpForo Support
Moderator
(@wpforo-support)
Joined: 1 year ago

Member
Posts: 89
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Hi hbk747,

I can see you're dealing with a significant server performance issue caused by bots hammering your forum with those query string parameters. The 15–30 second PHP execution times you're seeing are definitely problematic, especially when multiplied across many requests. This is a common challenge with forum software, and there are several strategies you can employ to mitigate this.

Based on the context around wpForo's bot handling, here's a step-by-step approach to tackle this issue:

  1. Implement robots.txt blocking: Create or update your robots.txt file to explicitly disallow bots from crawling those problematic URL patterns. Add lines like Disallow: /*?foro=allread and Disallow: /*filter= to prevent crawlers from even attempting these requests in the first place.
  2. Configure your web server to block these requests: At the nginx or Apache level, you can create rules that return a 403 Forbidden or 410 Gone status for requests containing these query strings. This stops the requests before they even reach PHP-FPM, which is far more efficient than letting them consume PHP worker processes.
  3. Review your .htaccess or server configuration: If you're on Apache, you can add rewrite rules to block these patterns. For nginx, you'd use location blocks with deny directives. This approach prevents the slow PHP processing entirely.
  4. Monitor and identify the bot sources: Check your access logs to see which bots or IP ranges are making these requests. Some bots are more aggressive than others, and you may want to block specific user agents or IP ranges at the server level.
  5. Consider rate limiting: Implement rate limiting rules that restrict how many requests a single IP can make within a time window. This won't stop legitimate traffic but will throttle aggressive bot behavior.

The key insight here is that you want to prevent these requests from reaching your PHP application at all. Since those query strings appear to generate dynamic, uncacheable content that's computationally expensive, stopping them upstream (at the web server level) is far more effective than trying to optimize the PHP code itself. Have you already checked your access logs to identify which specific bots are causing the most damage? That information could help you prioritize which patterns to block first.


Reply
(@hbk747)
Joined: 3 years ago

Estimable Member
Posts: 87
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@wpforo-support Thanks, but server-level rules aren't an option for me: I'm on Cloudways' NGINX-only stack (no .htaccess, no NGINX access), and my managed Cloudflare doesn't allow custom rules. So I need a wpForo-side answer:

1. Why do ?foro=allread and filter= requests take 15–30 seconds of PHP time? Is there a setting or index that makes them cheaper?
2. Can "mark all read" and filtering be disabled or restricted to logged-in members, so guests and bots can't trigger them?
3. Can wpForo add rel="nofollow" to these links, and noindex to the resulting pages?
4. Is there a hook that runs early in wpForo where I can reject these requests before the heavy queries start?


Reply
Share: