This blog post is going to detail my journey with running a Node & PHP (WordPress) development environment on Windows 10 using WSl2, Docker and VS Code. I will share the bare config in a final, separate post at the end. The Goal I am a React developer by trade, so all I really need …
Author Archives: admin habl
Enable/Disable WordPress plugins via database
Enabled plugins are stored as a serialised collection in the wp_options table with the option_name of active_plugins. Select the option_value paste into a deserialiser and edit the values. Update the database value to enable or disable plugins as needed. Setting a:0:{} will disable all plugins.
PowerShell move by date
I am terrible at keeping on top of my camera roll. I take pictures, they sync to the cloud, I forget them. Every time I try to sort them it is just such a huge undertaking that I give up. Enter Move-ByDate: Now I can tackle my camera roll one month at a time. And …
Using Restrict Content Pro with WPGraphQL
With the latest minor release of WPGraphQL comes the Model Layer – a much cleaner way to interact with post objects before they’re sent down the pipe to the client. I use Restrict Content Pro (RCP) to handle membership levels and appropriately restrict visibility of posts to users. Previously, I was hooking into the WP …
Continue reading “Using Restrict Content Pro with WPGraphQL”
Embedding dynamicly named JavaScript in WordPress
A quick snippet to enqueue a directory of JavaScript files in a WordPress template.
PowerShell interactive menu
At work, I regularly need to run up to three dotnet core backend services while doing front end development in VS Code. It’s tiresome to start a new PowerShell session for each one. I’ve always wanted to write an interactive menu for PowerShell, so I finally got around to it. See below for PowerShell 6.1. …
FTP upload all recently modified files
I’ve been doing some development on a WordPress site recently. Due to limitations of the hosting environment, deploying from git is not an option – I have had to FTP the changed files to the staging server to test my changes. Since I don’t know PHP I am redeploying files repeatedly with minor fixes. To …
Self Elevating PowerShell cmdlet
Sometimes you need to run a script as an administrator. It’s a simple enough process to start an Administrator PowerShell window, but you still need to navigate to the path required etc etc. Since there isn’t a simple sudo command for PowerShell one way to handle the permissions is to use a self-elevating script. [code language=”powershell”] …