$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>performance - Wordpress speed slow after .5 million single image post via wp-cli|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

performance - Wordpress speed slow after .5 million single image post via wp-cli

matteradmin9PV0评论

I am trying to Creat Wordpress website that will contain 10 Million post, such that when i upload a single its become a post with it's own name as title. and i am importing these images with Wp-cli. now the problem i am facing is that i have uploaded about half a million images and now Wordpress has become slow, its taking too much time to import images. please suggest me any solution for this

Images Importing goes slow down, Server usage only 1% i am doing this Via WP-cli with this command

wp media import ~/Pictures/processed-images-medium/\*\*\/\*.jpg

every time when image upload its become a Unique post you can check it at here

/

I am trying to Creat Wordpress website that will contain 10 Million post, such that when i upload a single its become a post with it's own name as title. and i am importing these images with Wp-cli. now the problem i am facing is that i have uploaded about half a million images and now Wordpress has become slow, its taking too much time to import images. please suggest me any solution for this

Images Importing goes slow down, Server usage only 1% i am doing this Via WP-cli with this command

wp media import ~/Pictures/processed-images-medium/\*\*\/\*.jpg

every time when image upload its become a Unique post you can check it at here

http://www.wallpaper2k/naked-art-first/
Share Improve this question edited Dec 30, 2018 at 15:14 Shoabch asked Dec 30, 2018 at 14:21 ShoabchShoabch 11 bronze badge 6
  • You mean the import is slowing down, or that browsing your website is slow? Are you importing all images to a single post? Try to profile it to find the bottleneck. Maybe it's the process of determining the unique slug that's getting slower? Please update your question with more detail to increase the change of someone giving a useful answer. – birgire Commented Dec 30, 2018 at 15:04
  • i have update the Question please check it now, Thanks – Shoabch Commented Dec 30, 2018 at 15:06
  • Try e.g. to log the time for e.g. wp_insert_post() and wp_unique_post_slug() on your dev install and try to look for suitable hooks for that. The wp profile command might also give info on your site. – birgire Commented Dec 30, 2018 at 15:35
  • Could you please explain it how i can do it? – Shoabch Commented Dec 30, 2018 at 15:48
  • 2 You might also get an indication by running those WP functions within the wp shell with a timer (search e.g. for microtime in PHP) or e.g. try it with wp profile eval <php-code>. You can also look at it from within the wp-admin backend, with a profiling plugin like the Query Monitor and try e.g. to see if it gives any information when you manually upload a file. Note that this site does not favor long comment discussion, so it's recommended to give as much detail in the question to increase the change for someone being able to give a useful answer. – birgire Commented Dec 30, 2018 at 16:15
 |  Show 1 more comment

1 Answer 1

Reset to default 0

You need to either read more about database optimization or hire a specialist and distribute those posts possibly on multiple database and file servers. Even if you build a custom solution it would be slow so don't blame WP.

Post a comment

comment list (0)

  1. No comments so far