PHP Fatal Error Uncaught Error Call to undefined function exec - WP-CLI Not Working: Call to undefined function exec()

WP-CLI Not Working: Call to undefined function exec()

For some operations such as database export, WP-CLI uses PHP exec() function which is disabled on most shared hosting servers. So if you do wp db export and no file was created, make sure to check your error_log file and if you notice this error: PHP Fatal Error: Uncaught Error: Call to undefined function exec() … Read full article →

Reinstall all WordPress plugins using WP CLI - Reinstall all WordPress plugins using WP-CLI

Reinstall all WordPress plugins using WP-CLI

Here is a convenient WP-CLI command that I use when cleaning hacked WordPress websites in order to reinstall all plugins from WordPress.org It consists of two commands: get a list of all active plugins, then force reinstall for each plugin. To reinstall all WordPress themes in the same manner use:

Download older Plugin Versions from WordPress.org  - Download older Plugin Versions from WordPress.org

Download older Plugin Versions from WordPress.org

You can download older versions of any plugin hosted on WordPress.org directly from the website or from WP-CLI. To download older plugin versions from WordPress.org click on the Advanced view link scroll down to the end of the page and under Previous Versions select the version that you would like to download. that’s it! Another … Read full article →

wpcli shortcodes - List all shortcodes from all WordPress posts with WPCLI

List all shortcodes from all WordPress posts with WPCLI

If you used shortcodes from a certain plugin or a theme and then stop using either one, then chances are that you still have shortcodes that no longer translate into anything. In this guide We will be using WP CLI Shortcode scrapper package to find all shortcodes in the database. This command works by searching … Read full article →

Install WP CLI in cPanel with CageFS - Install WP-CLI in cPanel with CageFS

Install WP-CLI in cPanel with CageFS

In this guide, I talked about adding WP-CLI to your system, but if you use cPanel with CloudLinux, you also need to include it in CageFS so that all users can access the wp command. First, download the WP-CLI command inside /usr/local/bin Add WP-CLI path to CageFS: and inside add: save the file, then update … Read full article →

Delete unused images in WordPress using WP CLI - Delete unused images in WordPress using WP CLI

Delete unused images in WordPress using WP CLI

This small script uses a for loop to delete one post ID at a time, it will go through the database and list all media files uploaded in the provided data range that are not used inside posts. Change the date range according to your needs.

wp gatsby netlify - WordPress to Gatsby on netlify ☄️

WordPress to Gatsby on netlify ☄️

When migrating from WordPress CMS to another CMS there are a couple of ways to easily export all your posts and media files: In this guide we will be using the WPGraphQL plugin and Netlify to deploy a Gatsby website. Step 1. Fork the gatsbyjs/gatsby-starter-wordpress-blog repo on Github Step 2. Edit the gatsby-config.js file and … Read full article →

create a new wp admin users - 5 Easy ways to Create a WordPress Admin user

5 Easy ways to Create a WordPress Admin user

Here are five different methods to create a new WordPress Admin user. In all of the examples below I will use the following username/password combination, so make sure to change it before running any of the commands: username123 change username123 with your username password123 change password123 with your password [email protected] change [email protected] with your email … Read full article →

Delete inactive Plugins and Themes using WPCLI - Delete inactive WordPress Plugins and Themes using WPCLI

Delete inactive WordPress Plugins and Themes using WPCLI

Deleting all inactive WordPress themes and plugins from your website is a recommended security practice. Even when deactivated, old, insecure plugins and themes might still pose a threat to the security of your WordPress website. Here are oneliners to remove inactive themes and plugins from your WordPress website using WP-CLI. List all inactive WordPress themes: Delete … Read full article →