assign posts - Assign all posts from one user to another

Assign all posts from one user to another

This simple query allows you to transfer all posts from one user to another. SQL query This will assign all posts from author ID=14 to the user with ID=1 (admin). WP-CLI This will remove the user bob@example.com and assign all his posts to user with ID=1 (admin).

Move wp config outside the web root directory - Move wp-config.php outside the web root directory

Move wp-config.php outside the web root directory

I recently did a guide on 5 (Less known) WordPress Security Tips to keep your website safe from hackers where I suggested moving wp-config.php outside the web root directory as a simple change that adds an additional layer of security to your WordPress website. The wp-config.php file contains your MySQL database username & password, along with … Read full article →

Display the total number of posts in WordPress - Display the Total 🔢 Number of Posts in WordPress

Display the Total 🔢 Number of Posts in WordPress

Step 1. Add the following inside your theme functions.php file or create a new Child theme first and add the code to it: Step 2. Add the shortcode [total_posts] anywhere on the website where you want to display the total number of posts: And it will display the number. 🙂

5 Easy Ways To Speed Up Your WordPress - 5 Easy Ways To Speed Up Your WordPress ⚡

5 Easy Ways To Speed Up Your WordPress ⚡

WordPress is an awesome content management system. You can install it in one click, you can find professional-looking themes for as little as a few dollars, and you can use a wide range of plugins for added functions and features. Nonetheless, WordPress websites can become sluggish sometimes, chasing impatient visitors away. This article is going … Read full article →

WordPress Locale Usage Statistics UPDATED - WordPress Locale Usage Statistics UPDATED

WordPress Locale Usage Statistics UPDATED

A locale is the translation language code used in WordPress that usually consists of a combination of language code and country code, combined with an underscore, for example en_AU or en_GB. Here is a complete and UPDATED List of All WordPress Language Locales 🏳️‍🌈 This page displays the market share (in %) for each locale (Language code) that WordPress websites are … Read full article →

WordPress FS METHOD explained - WordPress FS_METHOD explained

WordPress FS_METHOD explained

The constant FS_METHOD determines the filesystem method that WordPress should use for reading, writing, modifying, or deleting files. To set a different method for file editing, simply edit your wp-config.php file and add the line: The FS_METHOD forces the filesystem method and accepts the following values: Method Description direct Use Direct File I/O requests from within … Read full article →

How to get free WordPress hosting - How to get free WordPress hosting?

How to get free WordPress hosting?

Back in 2010 when I was starting my web development journey, having a website was expensive, especially on a high-school student budget. I had plenty of dumb ideas, and no money to realize all of them (thank God 🙏). So I was looking for shortcuts to save on a domain name and hosting. I will … Read full article →

wpcli password reset - Reset WordPress user password using WP-CLI

Reset WordPress user password using WP-CLI

In this guide We’ll cover how to reset a WordPress user password using WP-CLI. Step 1. Ensure WP-CLI is installed and you are in the website directory run the following command to check if you are in the right folder: Step 2. List all users and note user_login for the user Step 3. Replace the … 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: