![]() Performs optimizations without the need for running manual queries.Retains a set number of weeks’ data during clean-ups.Carries out automatic weekly (or otherwise) clean-ups.Detailed control of which optimizations you wish to carry out.Compacts/de-fragment MySQL tables with a button-press.trashed/unapproved/spam comments, stale data) plus pingbacks, trackbacks and expired transient options Mobile-friendly and incredibly simple to use, it: WP-Optimize Cache clears out all of this unnecessary data, cleans up your tables and even retrieves space lost to data fragmentation. Your WordPress database stores everything that you need for your website – plus many things that you don’t. NEW: The built-in minify feature adds another layer of optimization, reducing the size and number of requests to your server. But when you combine the cache with the database optimization, image compression features and minify, the speed difference with alternative solutions is significant. “defer CSS JavaScript”).Įxtensive tests show the cache feature alone can make WordPress sites at least as fast as any other caching or speed plugin available and often faster. It also enables you to minify and asynchronise CSS and JavaScript (aka. It allows you to cache your pages, for super fast load times (read more caching information below).It gives you the option to compress your images.It allows you to clean and optimise your database.These commands in WP-CLI can be used daily or weekly to keep your site optimized and free of bloat. These WP-CLI commands are all very handy for basic housekeeping of your site. Wp post delete $(wp post list -post_type='revision' -format=ids) If you did want to delete all post revision, then you can run this command Wp post delete $(wp post list -post_status=draft -format=ids) Delete Posts With Revisions If you did need to delete all posts that are set as draft post status, you could run this command Wp post delete $(wp post list -post_status=trash -format=ids) Deleting Posts in Draft Status If you wanted to delete all posts that are in the trash, only run this command if you have moved posts to the trash, then you could run this command: If you want to optimize your site database, you can run this command: Wp transient delete -expired Optimizing a Database If you need to delete any of this temporary data, you can remove it from your database by running the following command: Wp comment delete $(wp comment list -status=spam -format=ids) Removing Temp Data from DatabaseĮxpired transients can build up if you have a WooCommerce store. Only run this command if you know that you do have comments marked as spam on your site, then you can run this command: ![]() If you have comments enabled on your site and you want to delete all spam comments. Wp media regenerate -yes Deleting Spam Comments If you changed the theme you were using on your site (which might be setting different image sizes), or if you changed the product image sizes in WooCommerce but now need to regenerate all thumbnail images, you can run this command: Wp cache flush Regenerate Thumbnail Images In this example, object caching is enabled on the site on our Managed WordPress or Managed WooCommerce, if you need to clear the object cache, use: In this post, many of the most common tasks are covered: Want to clean up your WordPress site without having to add multiple plugins? By using WP-CLI, you can run many useful commands to helpfully clean up your database and elements related to your site.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |