Top Nav

Archive | WordPress

WordPress External Cron

For low traffic WordPress sites, the internal cron will not run on a reliable schedule resulting in missed jobs. For high traffic sites the internal cron can result in excessive cron runs. The solution is to disable the internal cron and setup an external cronjob at the operating system level.

To disable the internal cron add the following to wp-config.php:

For the external cron you can use curl or wget, but my preference is wp-cli like this:

On a Plesk server this might look like:

0

Regenerate WP-Rocket .htaccess From Command Line

To regenerate the .htaccess file with WP-Rocket rules from the command line do the following:

  • Install wp-rocket extension for wp-cli:

  • Regenerate the .htaccess file:

There are additional useful commands on the rocket extension. See https://github.com/GeekPress/wp-rocket-cli for details.

 

 

 

0

Quick WordPress Install With wp-cli

These steps assume that wp-cli is installed and a database has been created.

 

0

WordPress SSL Termination Fix

Add this code to wp-config.php to stop redirect loops caused by SSL termination on a proxy or load balancer:

 

0

Change WordPress User Password With WP-CLI

WP-CLI is a great tool for managing WordPress sites from the command line. As an example you can quickly change a WordPress user’s password with WP-CLI. This can be very handy on sites that you don’t have a WordPress admin login. First, if you don’t already have WP-CLI installed then follow the instructions here:

http://wp-cli.org/#installing

Then “cd” to the root of the WordPress site and run the following command:

Where <user> is the username and <pass> is the new password.

Here’s an example:

You can actually update other user parameters with the “user update” sub-command. See the full docs here:

http://wp-cli.org/commands/user/update/

 

 

 

0