Dev License: This installation of WHMCS is running under a Development License and is not authorized to be used for production use. Please report any cases of abuse to abuse@whmcs.com

Relocating the Cron Directory: A Guide to Efficient Cron Management

thumb_up 1  ·  sell Moving crons directory, Cron directory relocation, Managing cron tasks efficiently

We recommend moving the crons directory to a private directory above your web root. This will prevent web-based access and help to protect your WHMCS installation.

To do this, you must move the directory and update WHMCS's configuration to use it successfully.

We recommend performing this task and other security measures immediately after installing WHMCS. For a full list, see More Ways to Secure Your WHMCS Installation.

Moving the crons Directory

This process involves editing multiple configuration files. You can do this using the file management tools in your hosting control panel (for example, Files >> File Manager in cPanel) or using the command line.

To move the directory and update WHMCS's configuration:

1. Move the entire /crons/ directory and its contents to the new location.

2. If you have already configured cron tasks or email forwarders., update them to use the new directory path.

3. If you have not already done so, rename the config.php.new file to config.php.

4. Open the config.php file and locate the $whmcspath line.

eeba25ca-8a69-4515-8068-f38baa99ce35.png

5. Delete the two / characters at the beginning of the line and replace /path/to/whmcs/ with the full path to your installation. For example:

$whmcspath = '/home/username/public_html/whmcs/';
 

6. Save and close the file.

7. Open the configuration.php file in your WHMCS installation root directory.

8. Add the following line to the bottom of the file, where /home/username/whmcs_crons/ is the location of your new directory:

$crons_dir = '/home/username/whmcs_crons/';
 

9. Update the cron job to use the new directory path. For example, you can use the steps below to update the cron job in cPanel:

a. In the cPanel interface, go to Advanced >> Cron Jobs.

b. Choose Edit for the existing cron job for the cron.php file.

485cc3ed-4cbd-4729-b4ae-3116266fe7fe.png

c. Update the command to use the correct new path.

d. Click Edit Line.

Custom crons Locations and Upgrades

Applying updates or patches after customizing your crons directory location requires an additional step. You must upload any updated crons files from the default location to your custom directory.

If you do not move the files, you will see errors and issues with WHMCS's automation.

 

 

The End! should you have any inquiries, we encourage you to reach out to the Vercaa Support Center without hesitation.

Was this answer helpful?

Related Articles

description

Step-by-Step Guide to Installing WHMCS

To start using WHMCS, you will need to install it on your server. You may need help from your hosting provider or system administrator…

arrow_forward
description

Configuring cPanel Site Software for WHMCS Integration: A How-To Guide

You can install WHMCS using cPanel's Site Software feature. Before you can perform the installation, a WHM user must enable WHMCS…

arrow_forward
description

Effortless WHMCS Installation Using cPanel Site Software: A Step-by-Step Tutorial

You can install WHMCS easily using cPanel's Site Software feature. To do this: 1. If you have not already done so, configure…

arrow_forward
description

Configuring WHMCS Cron Jobs: Step-by-Step Setup Guide

You will need to configure the cron job as soon as you finish installing WHMCS. The cron job executes WHMCS's automation tasks,…

arrow_forward
description

Customizing the WHMCS Cron Schedule: Configuration Guide

The WHMCS cron job performs many of the automated tasks for your WHMCS installation. You can customize when and how often it runs…

arrow_forward
arrow_back « Back

Powered by WHMCompleteSolution