Display all Active WordPress plugins - Display all Active WordPress plugins

Display all Active WordPress plugins

Here is a simple WordPress plugin that will create a [activeplugin] shortcode: Add it as plugin and activate, then add shortcode [activeplugins] anywhere on your website and it will display all active plugins:

template name - Display template name in WP admin bar

Display template name in WP admin bar

Figuring out templates that are being used while you are building and developing a custom WordPress website can be problematic. Using the following snippets you can quickly and easily display template name or full path to the file in your wp-admin bar. Display Template name To display just template name add the following to functions.php … Read full article →

Reinstall WordPress Core using WP CLI - Reinstall WordPress Core using WP-CLI

Reinstall WordPress Core using WP-CLI

Useful WP-CLI commands that I use when cleaning hacked WordPress websites in order to reinstall WP core, all themes, and plugins from WordPress.org

Display visitor IP address without any WordPress plugin - Display visitor IP address without any plugin

Display visitor IP address without any plugin

Here is how you can create a WordPress plugin with a shortcode to display the user’s IP address: <?php /* * Plugin Name: IP * Plugin URI: https://wpxss.com/application/ip * Description: Provides a shortcode to display the user’s IP address. * Version: 1.0 * Author: Stefan Pejcic * Author URI: https://pejcic.rs */ function ip_shortcode( $atts ) … Read full article →

wpcli export specific tables wordpress - Dumping specific tables using mysqldump or WP-CLI

Dumping specific tables using mysqldump or WP-CLI

For high-traffic websites, I advise developing a stagging website if you make significant updates or even switch the WordPress theme entirely. But one significant problem I encountered while moving from the staging site to the live one is that all database tables are updated, which could result in financial loss if the website receives multiple … Read full article →

Call to undefined function wp filesize WPXSS Blog - Uncaught Error: Call to undefined function

Uncaught Error: Call to undefined function “wp_filesize” in /wp-admin/includes/image.php:249

The error indicates that a WordPress plugin or theme is requesting the “wp_filesize” function but the WordPress core is either corrupted or outdated and does not have that function yet. Uncaught Error: Call to undefined function “wp_filesize” in /wp-admin/includes/image.php:249 WordPress 6.0 introduced the wp_filesize() function which should be used in favor of PHP’s filesize(). If … 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 →