A practical guide to using WP-Cli to install and manage WordPress

Sdílet
Vložit
  • čas přidán 12. 11. 2023
  • In this practical guide to using WP-CLI, you'll learn how to streamline your WordPress installation and management processes. From quickly installing WordPress to managing plugins, themes, and generating posts, you'll discover how to harness the power of the command line for WordPress.
    Here's a breakdown of what you'll find in this video:
    Setting Up WP-CLI: Learn how to install and configure WP-CLI for your local WordPress development environment.
    Exploring WP-CLI Commands: Get an in-depth look at various WP-CLI commands, including 'wp core,' 'wp config,' and 'wp db,' and how to navigate their documentation.
    Configuring WP Config: Understand how to generate and modify your wp-config.php file using 'wp config' commands. You'll also see how to shuffle salts and set different configuration parameters.
    Creating the Database: Learn how to create the WordPress database using 'wp db create,' ensuring your WordPress installation has a functioning database.
    Running the Core Installation: Explore how to perform the core installation of WordPress from the command line using 'wp core install' and set up the essential parameters, including URL, title, username, and more.
    Managing Plugins: Discover how to manage plugins with WP-CLI, including installation, activation, and removal. You'll see how to find plugin slugs and use them to install and activate plugins directly.
    Removing Default Themes: Learn how to remove default themes bundled with WordPress, streamlining your theme management from the command line.
    Generating Posts: Automate the creation of posts in WordPress using 'wp post generate,' and set parameters such as post type, post count, post status, and more. You'll also see how to handle post content and attributes.
    User Management: Consider the possibilities of user management with WP-CLI, especially for running automated tests and tasks that require specific user roles.
    Bonus: Bundling Commands in a Bash Script: Get an added bonus where all the commands demonstrated are bundled in a single bash script, allowing you to perform a complete WordPress setup with one simple command.
    By the end of this video, you'll have the skills and knowledge to make your WordPress workflow more efficient and effective using WP-CLI. If you found this guide useful, don't forget to like, leave your questions in the comments, and subscribe for more helpful content. Thank you for watching, and we'll see you in the next video.
    Link to the bash script used in this video can be found here gist.github.com/eirichmond/10...

Komentáře • 19

  • @mhassankhan8677
    @mhassankhan8677 Před 4 měsíci +1

    You made it look so easy, awesome , don't stop making videos please. Cheers

  • @MarkConstable
    @MarkConstable Před 8 měsíci +1

    Excellent run through of how to use wp-cli. Many thanks 🙂

  • @HullioGQ
    @HullioGQ Před 5 dny

    "wp db create" - when did you create a database file named wpcli? I got lost there - minute 14.

  • @arkoleon
    @arkoleon Před 4 měsíci +1

    Nice guide. In which local server you are running the wordpress?

    • @elliottrichmondwp
      @elliottrichmondwp  Před 4 měsíci

      Hi @arkoleon, I use Valet to serve my local sites.

    • @pablobonalio1897
      @pablobonalio1897 Před 4 měsíci

      @@elliottrichmondwp Hi Elliot, thanks for the tutorial. Hw would I find the folder if I am using XAMPP?

    • @elliottrichmondwp
      @elliottrichmondwp  Před 4 měsíci

      The folder that serves all your accounts should reside in /xampp/htdocs/ but you will to ensure you have WP-CLI installed locally, if you haven't done that yet please see my other video on getting setup for modern WordPress development czcams.com/video/v_Or9qtzKdE/video.html

    • @pablobonalio1897
      @pablobonalio1897 Před 4 měsíci

      @@elliottrichmondwp thank you Elliot!
      Indeed I visited that video and followed the instalation process, however when I stated following you on this video I got stuck because my installation process didnt automatically create a wp-config.php file...I tried creating it from the -sample but I am failing somewhere... now when I input wp core --info it says the site is not installed, and when following instructions to install it asks for url title and admin parameters

    • @pablobonalio1897
      @pablobonalio1897 Před 4 měsíci +1

      And I tell you what, thats what happens when you "watch" a tutorial and get distracted. Took a break, then came back to watch the video from the beginning and everything is working smooth.
      Thanks Elliot, amazing tutorials the three from installing wpcli, installing wp and creating your own block theme for wordpress.

  • @danieluxury
    @danieluxury Před 4 měsíci +1

    nice tutorial! Where can I get the bash?

    • @elliottrichmondwp
      @elliottrichmondwp  Před 4 měsíci

      Sorry, I forgot to leave it in the description, now updated, you should find it there at the bottom of the description.

    • @danieluxury
      @danieluxury Před 4 měsíci

      Thank you so much for sharing @elliottrichmondwp ! I am kind of starting on Web Development and after almost a year with Drupal I am moving for WordPress, to take a look and get some jobs/tasks. Amazing how fast you can create awesome pages in minutes. I have been asked to use twig/timber and sass in my next project. Any advice?

    • @elliottrichmondwp
      @elliottrichmondwp  Před 4 měsíci

      @danieluxury personally I’d stick as close to core as possible but appreciate that some agencies require libs like twig/timber but I’m afraid I don’t have much experience with such libs unfortunately 😕

    • @danieluxury
      @danieluxury Před 4 měsíci

      @@elliottrichmondwp for what I understand, it won't be necessary to add twig if we are able to use sass. Your content has been really inspiring and helpful.

    • @elliottrichmondwp
      @elliottrichmondwp  Před 4 měsíci

      Thank you so much, really appreciate the feedback 🙏