You just have to modify your query to get only first 25 matches SELECT * FROM $wpdb->blogs WHERE spam = '0' AND deleted = '0' and archived = '0' and public="1" limit 25
.
The result is already order by id
what is incremented automatically, you don’t have anything to bother about there.
Also please note, it is not a good practice to do such queries on every request, you should cache them.
Related Posts:
- Is there a wordpress function to cleanly delete an entry in the signups table?
- SQL to check how many sites a user is a member of
- How to Move Local Singlesite Database to Remote Multsite Database?
- WPML tables not deleted when removing multisite subsite, need help clearing up my sql-file! [closed]
- Database Tables Lost Indexes? How to Recover?
- WP MultiSite: Can’t select database error after changing to new domain
- Minimize Performance Issues of MultiSite Large Number of Tables Created
- Can I replace the “Upgrade Network” with SQL query?
- How to use WordPress Multisite With Different Domain Names?
- multisite: use a virtual subfolder for subblogs
- WP Multisite – multilanguage – swich to other language by click, but “same” content
- How to disable Multisite sign-up page?
- How To Provide Sub-Blogs Their Own Domain Names?
- “You need a higher level of permission” after admin changing. Why?
- Advanced Custom Fields Multisite Upload/Imagery Issue [closed]
- Prevent user creating new users with specific roles
- What is the correct form action URL for network options pages?
- Lock one of WP Network sites for not registered users
- BuddyPress on Multisite [closed]
- Tax_query not working on multisite
- Migrating WPMS from apache to IIS7 causes Database Error
- Can I manage more wordpress sites with one wordpress administrator page? [closed]
- Add menu page on multisite
- Subfolder multisite issue. Themes and plugin files 404
- htmll lang=”de” but admin page in English
- Multisite list all pages in site
- Dissolve Multisite while making site #5 the main site?
- Disable domain redirect
- Multisite setup on IIS with subdomains
- Disabling outbound connectivity on web servers [closed]
- Make a user administrator to a sub directory site and a contributor to main site in multisite network
- How to store custom user data on the database?
- The wp_blogmeta table is not installed. Please run the network database upgrade
- NGINX rewrite rules for sub subdomains
- Enable wildcard in a WordPress Multisite (Sub-Domains)
- Multi-site get_bloginfo(‘stylesheet_directory’) referring to sub-folder
- Temp URL Redirect Loop
- Create a homepage like WordPress.com?
- Multisite with subfolders- can’t access main site- Error establishing a database connection
- WP MU Register User across all blogs
- get post id by $content (so by post content)
- Set default settings for all new multisites?
- How to disable a network enabled plugin on all sites, excepting on one?
- wp_mail() not sending email in multisite subdomain
- What are good approaches to routing some urls to a second WordPress install?
- Show content of other domain inside WordPress
- Moving a remote WordPress multisite installation to local
- Multisite redirecting wrong when without WWW
- Multisite, domain mapping and SSL?
- 3 blogs on one site with the same header menu?
- Get users registered 30 days ago(or more)
- Update blog option during create new blog?
- Is it best to avoid using $wpdb for security issues?
- Save uploads directly in the uploads folder (on a multisite)
- Cannot select signup_meta upon multisite user activation
- Missing images after moving servers
- Create “/blog” sub-site on WP multisite network
- Share contents/posts between sites in a WordPress 5.6
- Wait ajax to complete before continue loop
- Multi-vendor with custom shop site for each vendor
- You need to login with a user that has edit posts capacity?
- Multisite default theme and child applied to network
- Change WordPress Multisite Domain
- WPMU add custom colum
- Remove W3 Total Cache minified files on custom page outside of WordPress [closed]
- Pros and Cons of Post Types vs. Multiple Blogs
- How to automate setup of theme, pages, widgets, etc for a new site in multi-site?
- Restrict users of site 1 to login in site 2 in wordpress multisite
- “My Sites” incorrectly showing all network sites for all logged in users
- Unable to execute Ajax request, status code 400
- Merge posts of more than one site by using one database with the WordPress network
- A database for each category?
- Redirect a WordPress Multisite url after it has been change to a new one
- Structure of multilingual and multiregional directory listing website for translation
- multisite 404 subfolder same name slug as site
- How to make the redirects right? IP to domain name folders
- What is the optimal solution: WP Multisite vs InfiniteWP
- Best way to have multiple custom domains associated with a site within a multisite installation
- Subdomain multisite instances having same content
- Can I add a rewrite rule in htaccess to remove the multisite subdirectory from the URL?
- allow multisite in the installation process
- Multisite issue
- How to Add Super Admin for WordPress multi-site
- WordPress single sign on using cookies with shared user role functionality between more than 2 wordpress subdomains
- Can’t access 2nd site (sub) dashboard of WordPress Multisite
- How do I point two urls to the same child site in a multisite config
- what if one user in WPMU change the theme files?
- Multisite /files/ URLs broken after server move
- WordPress and SQL – Update and Insert from another table if column value doesn’t exist
- Network – My sites are unavailable
- White pages on sub domains after server transfer
- No input file specified after enabling multi site
- How do I enable Multisite on WP 3.7.1?
- Registration Page
- Can admins on network install view and edit users accounts?
- Unsure of my options, Multi-blog?
- WordPress Multisite with HTML template as Root
- WordPress Multisite (Network) some site users added to main site users list as subscriber
- Moving a WordPress Multisite site to a new install
- Run WordPress multisite from secondary volume on AWS EC2