prevent xss - ⚠️ What is Cross-site scripting (XSS) and How to prevent WordPress XSS attacks

⚠️ What is Cross-site scripting (XSS) and How to prevent WordPress XSS attacks

The most regularly seen attack type is script injection (XSS attack), rogue scripts are injected into the webpage for malicious purposes. This includes redirects to third-party websites, collecting user data, downloading malware to visitors, etc. WordPress has a bunch of useful developer functions that are used to sanitize data (Validating Sanitizing and Escaping User Data) … 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 →

Uncaught Error Call to undefined function wp in wp blog header.php16 - Uncaught Error: Call to undefined function wp() in wp-blog-header.php:16

Uncaught Error: Call to undefined function wp() in wp-blog-header.php:16

[20-Feb-2023 11:21:11 Europe/Belgrade] PHP Fatal error: Uncaught Error: Call to undefined function wp() in /home/user/example.com/wp-blog-header.php:16 Stack trace: #0 /home/user/example.com/index.php(17): require() #1 {main} thrown in /home/user/example.com/wp-blog-header.php on line 16 You may notice this error Uncaught Error: Call to undefined function wp() in wp-blog-header.php:16 on your error_log file if: wp() is a WordPress core function that calls … Read full article →

WordPress database error Table .dbwp options is marked as crashed and should be repaired - WordPress database error Table './db/wp_options' is marked as crashed and should be repaired [✔️ SOLVED]

WordPress database error Table ‘./db/wp_options’ is marked as crashed and should be repaired [✔️ SOLVED]

Here are 4 different methods to fix the scary-looking error: “WordPress database error Table ‘./db/wp_options’ is marked as crashed and should be repaired”. NOTE: It is critically important that you backup your database before performing any of the following suggestions. You’re fully responsible for undertaking this yourself, I can’t be held responsible if you break … Read full article →

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 →

Bulk Delete Millions of WooCommerce Products using SQL - 🗑️ Bulk Delete WooCommerce Products using SQL

🗑️ Bulk Delete WooCommerce Products using SQL

While building and testing WooCommerce addons, I find myself in need of quickly deleting all WooCommerce products from the database. WPCLI is the easiest way to go, as you can achieve the desired results via a single line. NOTE:  if your database prefix isn’t the default wp_, you’ll need to change it with your actual database … 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.