How much data can WordPress carry? Can it handle hundreds of thousands of articles?
It’s no problem to support millions, but you need to rewrite some codes yourself and remove some time-consuming functions of WordPress.
Related recommendations: "WordPress Tutorial"
Faced with large amounts of data (millions), there are several aspects that can be considered for improvement:
1. Increase the database Partial index, index post_modified_gmt, post_date, post_date_gmt, author_post_date_gmt (if there are more authors).
2. When querying, remove the SQL_CALC_FOUND_ROWS parameter. This parameter is slower. Of course, it will affect some functions. If necessary, you can rewrite it yourself.
3. When logging in to the backend, count the total number of posts every time. This is relatively slow. In wp-includes/post.php, function wp_count_posts, you can rewrite it or remove the counting function.
4. The process of obtaining trackback after publishing an article SELECT ID FROM wp_posts WHERE to_ping <> ” AND post_status = 'publish' is very slow. (It is recommended to kill it directly)
5. WordPress search function, you can use some Replace it with open source search, or remove this function, otherwise the database will be basically paralyzed by a like.
6. Regarding the problem of classification directories, if there are many articles under each category, the logic involved in this part needs to be rewritten. Otherwise it will be very slow.
7. Remove some slow gadgets, such as archiving, or rewrite them yourself. Use themes made by others with caution.
The above is the detailed content of How much data can WordPress carry?. For more information, please follow other related articles on the PHP Chinese website!