Configuring WordPress with WP CLI
Vložit
- čas přidán 30. 07. 2024
- WP-CLI is one of the most powerful and underrated tools in my WordPress toolbox, saving me countless hours each month. In this video, I introduce WP-CLI and share a basic WordPress setup script that I use on nearly every development and demo site I make.
🧰 Resources:
• wp-cli.org/
• gist.github.com/adamslowe/dd0...
🌐 My Websites:
• adamlowe.io
• peakperformancedigital.com
✅ Connect with Me:
• Facebook: / peakperformancedigital
• LinkedIn: / adamshawnlowe
• CZcams: / @adamloweio
• Twitter: / @adamslowe
⚙️Tools I Use:
• WordPress.org: wordpress.org/
• Pinegrow Website Editor: pinegrow.com/
⌚ Timestamps:
00:00 Introduction
02:10 Overview of commands
03:09 Changing site url to https
04:35 Deleting and creating posts
06:18 Setting homepage and posts page
07:33 Finding WordPress options
07:50 Adding test data
09:07 Summary & Outro
Wow! I have been a WordPress developer for ages but I'd never used WP-CLI. You made it simple for me.
Thanks for the feedback! I also slept on it for a long time before realizing just how powerful it was. If I remember correctly, I had to do a massive DB search and replace that brought every plugin to its knees. WP Cli made it dead simple and faster than I thought it could be. From that moment on, I was hooked.
I always wanted to learn more about WP CLI, thanks for sharing. Hope you can go deeper on this topic. Have a great day, Adam!
There are so many one-off and edge case uses for WP-CLI, which is why I tried to keep this focused on something we could all benefit from. I'll take a look through my snippet library and see if I can find a few other things that can be generalized enough to justify a video.
Search and replace is the big one that comes to mind. Check out this Cloudways tutorial for a good overview. I probably use this one at least 3-4 times per month. (support.cloudways.com/en/articles/5126698-how-to-use-the-search-and-replace-function-of-wp-cli)
It would be amazing If you could do something like that. Thanks for sharing the article. Btw, I love your chill and friendly vibes.@@AdamLoweIO
Great video, Adam! I felt like I was back in my UNIX admin days and got all tingly inside!
Hey, our web servers all run Linux. There is no reason you can’t feel tingly everyday.
Thanks Adam.
Hello Adam! Thanks for sharing this video mate! I got stuck though when trying some commands on Windows. If you could share a Windows version of it would be great!
Thank you again for your fabulous work!
Some of the commands where I'm stringing together multiple commands or using unix utils like sed won't work on Windows unless you are running something like WSL. The wp-cli commands themselves should work fine though, you just can't automate quite as much with the regular windows command prompt as you can with a proper unix shell.
Really insightful for someone who knows nothing about WP CLI, and probably would break an entire site with a single attempt at it 😂
Your video was really well done though man, loved it. I can see how use this can be if used regularly.
Ha! The hardest part is getting into SSH. The commands are all relatively simple and the documentation is well done. #DontFearTheCommandLine
This one is going to my favorites.. Thank you, Adam.
Just watch out for the rabbit holes ;)
Truly good video content!
SO USEFUL
awesome , can we do backups with it ?
Some backup plugins like updraft can be used with WP-cli. By itself, WP-cli can export the WordPress database using the “wp db export” command. That, and an archive of your file system should do the trick nicely.
Here is an article with steps
blog.sucuri.net/2022/12/wp-cli-how-to-backup-wordpress.html