Cool Domains Knowledgebase

Cool Tutorials

Discover everything about cPanel, domain registration, and WordPress tutorials—without the confusing jargon! Our family-run business is dedicated to providing honest and valuable insights with straightforward WordPress tutorials every month. Simplify your web hosting journey while having a laugh, knowing we prioritize your needs with fair pricing and exceptional customer service. Our goal is to help you navigate the complexities of web management with ease and confidence. Whether you're a beginner or an experienced user, our WordPress tutorials are here to support you every step of the way.

image

Knowledgebase

cPanel

How to Change the PHP Version on Your Domain using cPanel

How to Change the PHP Version on Your Domain Using cPanel

Changing the PHP version on your domain through cPanel is a crucial task that can significantly impact the performance, security, and compatibility of your website. Different applications, particularly content management systems like WordPress, may require specific PHP versions to function correctly. This tutorial will guide you step-by-step on how to change the PHP version using cPanel, along with best practices and SEO considerations.

Step 1: Log in to cPanel

1. **Access Your cPanel**: Open your web browser and navigate to your cPanel URL, typically formatted as `https://yourdomain.com/cpanel` or `https://yourserverip/cpanel`.

2. **Enter Your Credentials**: Input your username and password. If you don’t have this information, check with your hosting provider.

Step 2: Locate the PHP Selector

1. **Find the Software Section**: Once logged in, scroll down to the **‘Software’** section. Look for the **‘Select PHP Version’** or **‘PHP Selector’** icon and click on it.

2. **Understanding the Interface**: You will be presented with a list of available PHP versions. The default version currently in use will typically be highlighted.

Step 3: Choose a New PHP Version

1. **Select the Desired PHP Version**: From the dropdown menu, select the PHP version you want to use for your domain. It’s advisable to choose a version that is supported by your applications. As of now, PHP 7.4 and 8.0 are commonly used versions, with 8.1 gaining traction for its performance improvements.

2. **Review Compatibility**: Before proceeding, ensure that your website’s themes, plugins, and scripts are compatible with the selected PHP version. You can usually find this information on the official documentation or support pages of your applications.

Step 4: Set the New PHP Version

1. **Set as Current Version**: After selecting the new PHP version, click on the **‘Set as current’** button. This will apply the changes to your domain.

2. **Verify the Change**: Once you’ve set the new version, cPanel may provide a confirmation message. It’s essential to ensure that the change has been successfully implemented.

Step 5: Test Your Website

1. **Check for Errors**: After changing the PHP version, visit your website to check for any errors or issues. If your site appears broken or displays error messages, it may indicate compatibility issues with the new PHP version.

2. **Enable Error Reporting**: If you encounter issues, consider enabling error reporting in your PHP settings to get more information about what might be causing the problems.

3. **Roll Back If Necessary**: If the new PHP version is causing significant issues, you can return to the **‘Select PHP Version’** section and revert to the previous version by following the same steps.

Best Practices for Changing PHP Versions

WordPress Best Practices

– **Backup Your Site**: Always take a full backup of your website before making changes to the PHP version. This includes backing up your database and files to ensure you can restore your site if something goes wrong.

– **Update Themes and Plugins**: Ensure all your themes and plugins are updated to their latest versions before changing the PHP version. This helps minimise compatibility issues.

– **Test in a Staging Environment**: If possible, test the new PHP version on a staging site first. This allows you to troubleshoot any issues without affecting your live site.

cPanel Management

– **Regular Updates**: Keep an eye on the PHP versions offered by your host. Regular updates to the PHP version improve security and performance, so consider updating whenever a stable release becomes available.

– **Monitoring Performance**: After changing the PHP version, monitor your website’s performance. Some versions may improve speed, while others might not, depending on your code and server configuration.

SEO Considerations

– **Website Speed**: Changing to a more recent PHP version can enhance your site’s speed, which is a critical factor for SEO. Faster websites generally rank better on search engines.

– **Avoid Downtime**: Ensure minimal downtime during the change process to prevent losing traffic. Test thoroughly before making changes to your live site.

Conclusion

Changing the PHP version on your domain through cPanel is a straightforward process that can enhance your website’s performance and security. By following the steps outlined in this tutorial and adhering to best practices, you can ensure a smooth transition and maintain the functionality of your site.

cPanel

How to Edit or Delete a Cron Job Through cPanel

How to Edit or Delete a Cron Job Through cPanel

Cron jobs are essential for automating tasks on your website, such as running scripts, sending automated emails, or performing regular backups. If you’ve set up cron jobs in cPanel, you may find the need to edit or delete them over time. This tutorial will walk you through the process step by step, including best practices for managing cron jobs in WordPress, cPanel, and relevant SEO considerations.

Step 1: Log in to cPanel

1. **Access Your cPanel**: Open your web browser and navigate to your cPanel URL, typically `https://yourdomain.com/cpanel` or `https://yourserverip/cpanel`.

2. **Enter Your Credentials**: Input your username and password. If you don’t have these details, contact your hosting provider.

Step 2: Locate the Cron Jobs Section

1. **Find the Cron Jobs Icon**: Once logged in, scroll down to the **‘Advanced’** section. Look for the **‘Cron Jobs’** icon and click on it.

2. **Review the Current Cron Jobs**: After clicking on the Cron Jobs icon, you’ll be taken to the Cron Jobs management interface. Here, you’ll see a list of existing cron jobs you’ve set up.

Step 3: Edit a Cron Job

1. **Identify the Cron Job to Edit**: In the **‘Current Cron Jobs’** section, locate the cron job you wish to edit. You’ll see details such as the command, schedule, and last execution time.

2. **Click on the Edit Link**: Next to the cron job you want to change, click on the **‘Edit’** link. This will take you to a form where you can modify the cron job’s settings.

3. **Modify the Schedule**: Adjust the schedule by selecting a different frequency from the dropdown menu or by entering new values in the custom fields:
– **Minute**: 0-59
– **Hour**: 0-23
– **Day**: 1-31
– **Month**: 1-12
– **Weekday**: 0-7 (where both 0 and 7 represent Sunday)

4. **Change the Command**: If needed, update the command that the cron job runs. Make sure to input the correct path to the script you want to execute.

5. **Save the Changes**: After making your adjustments, click on the **‘Edit Cron Job’** button at the bottom of the form to save your changes.

Step 4: Delete a Cron Job

1. **Locate the Cron Job to Delete**: In the **‘Current Cron Jobs’** section, find the cron job you wish to remove.

2. **Click on the Delete Link**: Next to the cron job, you’ll see a **‘Delete’** link. Click on this link to initiate the deletion process.

3. **Confirm Deletion**: You will typically be asked to confirm that you want to delete the cron job. Confirm your decision, and the cron job will be removed from your list.

Step 5: Best Practices for Managing Cron Jobs

WordPress Best Practices

– **Use WP-Cron for Internal Scheduling**: For WordPress sites, consider using the built-in WP-Cron, which handles scheduled tasks automatically. It’s particularly useful for tasks like publishing scheduled posts or running maintenance tasks.

– **Monitor Performance**: Regularly check the performance of your cron jobs. Ensure they aren’t using excessive resources. Overloading your server can lead to slow performance, especially on shared hosting.

cPanel Management

– **Limit Frequency**: Be cautious about setting cron jobs to run too frequently. For instance, running a script every minute can put a strain on your server. An hourly or daily frequency is generally more appropriate.

– **Log Outputs**: Consider logging the output of your cron jobs. You can redirect outputs to a log file by appending `>> /home/username/logs/script.log 2>&1` to your command. This helps in troubleshooting if something goes wrong.

SEO Considerations

– **Avoid Duplicate Content**: If your cron jobs generate content, ensure they do not create duplicates, which can negatively affect your SEO.

– **Maintain Site Speed**: Poorly configured cron jobs can slow down your website. This affects user experience and can have detrimental effects on SEO rankings. Ensure that all scripts are optimised for performance.

Conclusion

Editing or deleting cron jobs in cPanel is a straightforward process that helps you manage your website’s automated tasks effectively. By following the steps outlined in this tutorial and adhering to best practices, you can ensure your site runs smoothly while maximising performance and minimising potential issues.

cPanel

How to Create a Cron Job Through cPanel

How to Create a Cron Job Through cPanel

Cron jobs are essential for automating repetitive tasks on your website, such as running scripts, sending emails, or performing backups. If you manage your website through cPanel, creating a cron job is straightforward. This tutorial will guide you through the process step by step, along with best practices for WordPress, cPanel management, and SEO considerations.

Step 1: Log in to cPanel

1. **Access Your cPanel**: Open your preferred web browser and navigate to your cPanel URL. This is typically formatted as `https://yourdomain.com/cpanel` or `https://yourserverip/cpanel`.

2. **Enter Credentials**: Input your cPanel username and password. If you don’t have these details, check with your hosting provider.

Step 2: Locate the Cron Jobs Section

1. **Find the Cron Jobs Icon**: Once logged in, scroll down to the **‘Advanced’** section. Look for the **‘Cron Jobs’** icon and click on it.

2. **Understanding the Cron Jobs Interface**: You will be presented with options to add a new cron job and a list of existing cron jobs if any have been set up previously.

Step 3: Set Up a New Cron Job

1. **Choose the Frequency**: Under the **‘Add New Cron Job’** section, you’ll need to define how often the cron job runs. You can select a preset option from the dropdown menu, such as:
– Once Per Minute
– Once Per Hour
– Once Per Day
– Custom Interval

For more specific timings, you can use the custom fields:
– **Minute**: 0-59
– **Hour**: 0-23
– **Day**: 1-31
– **Month**: 1-12
– **Weekday**: 0-7 (where both 0 and 7 represent Sunday)

2. **Enter the Command**: In the command field, enter the script you want to run. For example, if you want to run a PHP script, it might look like this:
“`
/usr/bin/php /home/username/public_html/script.php
“`
Replace `/home/username/public_html/script.php` with the actual path to your script. Ensure that the script has the appropriate permissions to execute.

3. **Add the Cron Job**: Once you’ve configured the frequency and command, click on the **‘Add New Cron Job’** button to save it.

Step 4: Verify and Manage Your Cron Jobs

1. **Check Existing Cron Jobs**: After adding a new job, you will see it listed under the **‘Current Cron Jobs’** section.

2. **Edit or Delete Cron Jobs**: If you need to make changes, you can either edit or delete existing cron jobs. Click on the corresponding links to make adjustments as necessary.

Step 5: Best Practices for Using Cron Jobs

WordPress Best Practices

– **Limit Frequency**: Be cautious not to set cron jobs to run too frequently. Running scripts every minute can overload your server, especially on shared hosting environments. Typically, hourly or daily jobs are more appropriate for tasks like backups or maintenance.

– **Use WP-Cron**: If you are using WordPress, consider using the built-in WP-Cron for scheduling tasks within WordPress. It’s designed to handle tasks automatically, although it relies on site traffic to trigger. If your site has low traffic, consider setting a real cron job to call `wp-cron.php` at regular intervals.

cPanel Management

– **Monitoring Resource Usage**: Regularly check the resource usage in your cPanel to ensure that your cron jobs aren’t consuming excessive CPU or memory. If they are, consider optimising the scripts or reducing their frequency.

– **Logging Outputs**: If the scripts you run generate outputs, consider redirecting them to a log file. This can be done by appending `>> /home/username/logs/script.log 2>&1` to your command, where `/home/username/logs/script.log` is the path to your log file.

SEO Considerations

– **Avoid Duplicate Content**: If your cron jobs are set to perform tasks related to content generation, ensure that they don’t create duplicate content that could negatively impact your SEO.

– **Performance Impact**: Keep in mind that poorly configured cron jobs can slow down your site. Optimise scripts to run efficiently, as site speed is a critical factor for SEO.

Conclusion

Creating and managing cron jobs through cPanel is a powerful way to automate tasks on your website. By following the steps outlined in this tutorial and adhering to best practices, you can ensure that your site runs efficiently while maintaining optimal performance.

cPanel

How to Check Disk and Bandwidth Usage in cPanel

How to Check Disk and Bandwidth Usage in cPanel

If you’re managing a website through cPanel, it’s crucial to monitor your disk space and bandwidth usage. This not only helps you maintain optimal performance but also prevents unexpected downtimes and ensures that your site remains accessible to visitors. This tutorial will guide you through checking your disk and bandwidth usage in cPanel, with additional best practices for WordPress, cPanel management, and SEO considerations.

Step 1: Log in to cPanel

1. **Access Your cPanel**: Open your web browser and enter your cPanel URL, usually formatted as `https://yourdomain.com/cpanel` or `https://yourserverip/cpanel`.

2. **Enter Credentials**: Input your username and password. If you don’t have these details, consult your hosting provider.

Step 2: Locate Disk Usage

1. **Find the Disk Usage Tool**: Once logged in, scroll down to the **‘Files’** section. Look for the **‘Disk Usage’** icon and click on it.

2. **Understanding Disk Usage**: This tool will display a breakdown of your disk space usage, showing how much space each directory and file type occupies. It typically categorises your usage into different folders like `public_html`, email accounts, and other directories.

3. **Navigating the Data**:
– **Overview**: You will see an overview of total disk space allocated, used, and available.
– **Directory Breakdown**: Click on any directory for a detailed view. This helps identify large files or folders that may require cleanup.

Step 3: Locate Bandwidth Usage

1. **Find the Bandwidth Tool**: In the cPanel main dashboard, locate the **‘Metrics’** section and click on **‘Bandwidth’**.

2. **Review Bandwidth Data**: This page will provide a graphical representation of your bandwidth usage over a specified time frame (daily, weekly, or monthly).

3. **Details to Note**:
– **Total Bandwidth Usage**: This shows the total amount of data transferred to and from your website.
– **Breakdown by File Types**: Here you can see which files or scripts are consuming the most bandwidth, which is useful for identifying potential issues.

Step 4: Best Practices for Disk and Bandwidth Management

Disk Usage Best Practices

– **Regular Cleanup**: Schedule regular reviews of your disk usage. Delete unnecessary files, old backups, or unused themes and plugins in WordPress.
– **Optimise Images**: Use image compression plugins like **Smush** or **Imagify** to reduce image file sizes without losing quality.
– **Use Caching**: Implement caching solutions such as **WP Super Cache** or **W3 Total Cache** to serve cached versions of your site, reducing disk space and bandwidth usage.

Bandwidth Usage Best Practices

– **Content Delivery Network (CDN)**: Consider using a CDN like **Cloudflare** or **Amazon CloudFront** to offload bandwidth and improve loading speeds.
– **Minimise HTTP Requests**: Reduce the number of elements on your pages (scripts, stylesheets) to limit HTTP requests. Combine CSS and JavaScript files where possible.
– **Monitor Traffic**: Keep an eye on sudden spikes in traffic which could indicate a need for additional resources or potential attacks (like DDoS).

Step 5: SEO Considerations

1. **Optimise Load Times**: Faster websites rank better on search engines. Use the data from your bandwidth and disk usage analysis to optimise your site’s performance.

2. **Clean URLs**: Ensure that your URLs are concise and descriptive. This helps with SEO and reduces unnecessary bandwidth usage from poorly structured URLs.

3. **Quality Content**: Regularly update your website with high-quality content to improve SEO while managing disk space effectively. Use a blogging strategy to keep content fresh.

Conclusion

Monitoring your disk and bandwidth usage through cPanel is a straightforward yet essential task for maintaining a healthy website. By following the steps outlined above, you can ensure that your site runs smoothly and efficiently. Regular checks and optimisations will not only enhance performance but also contribute positively to your SEO efforts.

cPanel

How to Edit the .htaccess File Through cPanel File Manager

How to Edit the .htaccess File Through cPanel File Manager

The .htaccess file is a powerful configuration file used on Apache web servers. It allows you to make server-level adjustments, manage redirects, enhance security, and optimise your website’s performance. Editing the .htaccess file through cPanel’s File Manager is straightforward, but it requires caution as improper modifications can lead to website errors. This tutorial will guide you through the process, providing best practices, especially for WordPress users, along with SEO considerations.

Step-by-Step Instructions

Step 1: Access cPanel

1. **Log in to your cPanel account**: Open your web browser and enter your domain name followed by `/cpanel` (e.g., `www.yourdomain.com/cpanel`). Enter your cPanel username and password.

Step 2: Locate File Manager

2. **Find the File Manager**: Once logged in, scroll down to the ‘Files’ section. Click on **File Manager**. This tool allows you to navigate through your website’s files.

Step 3: Navigate to the Root Directory

3. **Go to the correct directory**:
– In the left sidebar, navigate to the **public_html** folder, which is typically where your website files are stored.
– If your site is in a subdirectory (e.g., if you have multiple sites), navigate to that specific folder.

Step 4: Locate the .htaccess File

4. **Show hidden files**: The .htaccess file is a hidden file. To view it, click on the **Settings** button in the top right corner of the File Manager and ensure that the option **Show Hidden Files (dotfiles)** is checked. Click **Save**.

5. **Find the .htaccess file**: Look for the `.htaccess` file in the list of files. If it’s not present, you can create one by clicking the **+ File** button, naming it `.htaccess`.

Step 5: Edit the .htaccess File

6. **Select the file**: Right-click on the `.htaccess` file and choose **Edit**. A new tab will open with a code editor.

7. **Make your changes**: You can now add, modify, or delete code. Below are some common adjustments you might consider for a WordPress site:

– **Redirects**:
“`apache
Redirect 301 /old-page.html http://www.yourdomain.com/new-page.html
“`

– **Custom Error Pages**:
“`apache
ErrorDocument 404 /404.html
“`

– **Disable Directory Browsing**:
“`apache
Options -Indexes
“`

– **Enable Compression**:
“`apache
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json
</IfModule>
“`

– **Security Rules**:
“`apache
# Protect sensitive files
<FilesMatch “\.(htaccess|htpasswd|ini|log|env)$”>
Order Allow,Deny
Deny from all
</FilesMatch>
“`

Step 6: Save Your Changes

8. **Save the file**: After making your changes, click **Save Changes** in the top right corner.

9. **Close the editor**: Once saved, close the code editor tab.

Step 7: Test Your Website

10. **Verify your changes**: Visit your website to ensure everything is functioning correctly. Check the specific changes you made to confirm they’re working as intended.

Best Practices

– **Backup Your .htaccess File**: Before making any changes, create a backup of your original .htaccess file. You can do this by downloading it to your computer or duplicating it within the File Manager.

– **Test After Changes**: After making edits, test your website thoroughly. Use tools like Google’s PageSpeed Insights or GTmetrix to check for performance issues.

– **Document Changes**: Keep a record of any changes you make. This can help you troubleshoot issues later.

SEO Considerations

– **301 Redirects**: If you’re changing URLs, ensure you implement 301 redirects to maintain SEO value.

– **Custom Error Pages**: Create user-friendly 404 pages to enhance user experience and keep visitors on your site.

– **Caching**: Consider adding caching directives to improve load times, which can positively impact SEO.

By following these steps, you can effectively edit the .htaccess file through cPanel File Manager while adhering to best practices and optimising for SEO.

World-Class Support

Running into trouble? That's not cool! Create a support ticket and let's get this sorted.