Update Theme and Plugins from Zip File WordPress plugin

New WordPress plugin now available:
Update Theme and Plugins from Zip File

Quickly and easily upgrade plugins and themes from a zip file without having to remove or delete their folders first, and avoid the “destination already exists” error message.

WordPress will let you install a NEW plugin or theme from a zip file, but it does NOT allow you to upgrade them from a zip file. If you try to upgrade from a zip file, you will get an error message that says “destination already exists” and the upgrade will fail. WordPress will not allow you to upgrade from a zip file.

Update Theme and Plugins from Zip File will allow you to easily upgrade from a zip file, avoiding the “destination already exists” error message.

There is also an option to create a backup copy of the old plugin or theme, in case there is a problem with the new version.

Auto Export DB Table to CSV File WordPress plugin that works with TablePress

This WordPress plugin lets you automatically schedule the export of a table from a MySQL query made on the WordPress database, and save it as a CSV file. You can then use this CSV file anyway you want

Works with the TablePress Automatic Periodic Table Import extension, so you can show/view/display any database table on a WordPress page.

Version 1.0.0 has no settings page yet, so all changes need to be made in the /wp-content/plugins/auto-export-db-table-to-file/auto-export-db-table-to-file.php file directly.

Download from here:
auto-export-db-table-to-file-v1.0.0.zip

 

Show Empty Product Categories for WooCommerce WordPress plugin

Show Empty Product Categories for WooCommerce WordPress plugin now available.

Show WooCommerce product categories even when they are empty and have no products assigned to them.

You can now easily enable or disable the display of empty product categories in WooCommerce.

** You may need to change your Shop Page Display and/or Default Category Display to include Subcategories on the WooCommerce > Settings > Products > Display page.

Auto Login New User After Registration WordPress plugin

Auto Login New User After Registration WordPress plugin v1.5.4 now available!

Automatically login new user right after they have registered. Add Password field to registration form. Disable admin notification emails of new user registrations and user password resets. Allow redirect of new user to any page right after they have registered.

This plugin has the following great features:

– Auto-login: When a new user registers, this will automatically log them in right away.

– Redirect: Choose the web page you want them to be redirected too after they register and are auto-logged in.

– Independent option to add Password field to new user registration form, so users can create their password during registration instead of having to wait for an email and clicking the link in the email.

– Independent option to disable the annoying admin notification emails about new user registrations. User will still receive their email about how to setup their password.

– Independent option to disable the annoying admin notification emails about users lost/changed password. User will still receive their email about how to reset their password.

WordPress Cron Job setup with WP-Cron.php

When setting up a cron job for WordPress we need to address a few issues. Do you really need to worry about setting up a separate cron job? Once you set it up, how do you stop it from sending you an email everytime? And once you set it up, how do you stop it from filling up your server with files?

WHY DO YOU NEED A SEPARATE CRON JOB FOR YOUR WORDPRESS SITE?

So the issue is, that by default, everytime somebody views a page on your WordPress site, the wp-cron job is run. This is not really an issue if you have less than 60 page views per hour (or 1 page view per minute). When you have a low traffic site, then there is not much else going on that wp-cron can interfere with. However IF you are getting more that 60 page views per hour, then it can start to become a much bigger issue and really slow your site down.

Lets consider an example where you are a high traffic site getting about 3,000 page views per hour (50 page views per minute). This would mean that wp-cron is being called and run for every single page view, meaning its being called and run 3000 times an hour. What if you get 30,000 page views per hour? Well now it is really interfering and causing a problem.

SETTING UP A CRON JOB

There are a multitude of sites that will teach you how to setup a cron job, so I will not go into all the details here. I will only briefly give you the two methods that you can use with their command line argument that you need.

Disbable wp-cron on page view

Regardless of which method you use, you will need to disable the wp-cron from running everytime somebody views a page on your site. You will need to edit your wp-config.php file and add the following lines at the top of the file. You can actually add them anywhere in the file really, just as long as they are after the  <?php  tag on the first line.

//Disable internal wp-cron function - setup external cron job instead.
define('DISABLE_WP_CRON', true);

Method #1 – WGET (recommended for WordPress)

The preferred way to setup an external cron job for WordPress is to use the WGET method. Make sure you include the --delete-after option otherwise your server will fill up with thousands of files named wp-cron.php.1 , wp-cron.php.2 , etc.

Use this line:
wget --delete-after http://mydomain.com/wp-cron.php

If this method keeps sending you an email everytime it runs, then you can stop the email by sending the output to a file instead with the --output-file option. This will only ever create one small file on your server as it will overwrite itself each time and will therefore not get big.

Use this line:
wget --output-file=cronlog_wp-cron.txt --delete-after http://mydomain.com/wp-cron.php

Method #2 – PHP Command Line Tool

The other method is to use the PHP Command Line tool from the cron. This is usually my preferred way to setup most cron jobs, however this creates an error in the WordPress wp-cron.php file where a require_once fails to load wp-load.php so it is not recommended.

Use this line:
/usr/local/bin/php -f /home/myroot/public_html/wp-cron.php

You may have to ask your web host where the php command line tool is located and adjust the /usr/local/bin/php accordingly. Also, you may have to ask your web host what your /myroot/ should be as well.

And if this method keeps sending you an email everytime it runs, then you can stop the email by sending the output to /dev/null instead.

Use this line:
/usr/local/bin/php -f /home/myroot/public_html/wp-cron.php > /dev/null

 

Please let me know if this was helpful by commenting below.