Support » Developing with WordPress » Speed up wp-cli post creation

  • I’ve noticed wp-cli takes a few seconds to create a new post. Same when importing a photo. When creating large sites, this can add up really fast.

    Is there a way to speed up post creation and image import? By creating multiple posts at once maybe? Or changing some parameters?

Viewing 1 replies (of 1 total)
  • @su1 there are a few things that could increase performance outside of wp-cli code optimization.

    Make sure you are using PHP 7+ (as this is much faster than PHP 5). Upgrade your copy of MySQL or switch to MariaDB (also if you connect to the database remotely this could slow the creation of a post down). Check your internet speed (some operations have to connect to the internet). And lastly it could be you are operating on older hardware that is slower, so it could be a physical limitation on your machine that upgrading might fix.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.