|
|
Line 3: |
Line 3: |
| <div class="docs-alert-warning">We recommend moving it to a non-public directory above your web root to prevent web based access.</div> | | <div class="docs-alert-warning">We recommend moving it to a non-public directory above your web root to prevent web based access.</div> |
| | | |
− | The files within the crons directory need to know where to find your WHMCS installation, and your WHMCS installation needs to know where to find the crons directory, so the relocation process involves editing two files.
| + | For steps to do this, see [https://help.whmcs.com/m/installation/l/1650302-moving-the-crons-directory Moving the Crons Directory]. |
− | | |
− | 1. Begin by choosing a new location for your crons directory and move the entire ''/crons/'' folder and contents to it.
| |
− | | |
− | 2. Open the ''config.php'' file within the crons directory and follow the instructions within it to uncomment the WHMCS path line and provide the full path to your WHMCS installation. For example:
| |
− | | |
− | <source lang="php">
| |
− | $whmcspath = '/home/username/public_html/whmcs/';
| |
− | </source>
| |
− | | |
− | The above example assumes cPanel is being used, where "username" is the account username and "whmcs" is the directory containing the WHMCS installation.
| |
− | | |
− | <div class="docs-alert-info">'''REMEMBER:''' After moving the crons directory, if you manually upgrade WHMCS in future, you will need to update the cron files in your custom folder location and not upload the cron files to the default crons sub-directory or you will lose the benefits of moving them.</div>
| |
− | | |
− | 3. Open the ''configuration.php'' file within your WHMCS installation root directory and add the following line to the bottom of the file so that WHMCS is able to locate your custom crons directory location and show you the correct paths you need to use for cron and piping command configuration within the admin interface.
| |
− | | |
− | <source lang="php">
| |
− | $crons_dir = '/home/username/whmcs_crons/';
| |
− | </source>
| |
− | | |
− | The above example assumes cPanel is being used, where "username" is the account username and "whmcs_crons" is the custom crons directory.
| |
− | | |
− | <div class="docs-alert-danger">If you have existing [[Cron Tasks]] or [[Email_Piping#Forwarder_Method|Email Forwarders]] configured before you make this change, you will need to update those to use the new directory path following making these changes.</div>
| |
Revision as of 21:17, 8 February 2023
The crons folder may be moved to any place above or below the docroot.
We recommend moving it to a non-public directory above your web root to prevent web based access.
For steps to do this, see Moving the Crons Directory.