Author Archives: Helpful

How to connect via SSH using keys

The SSH network protocol allows you to connect to another web server over the internet via a command-line interface (CLI). You can use this network protocol to remotely manage your server, configure CGI scripts, and perform other tasks. Your SSH session can be authenticated either with the username and password or with a pair of private/public keys. It is recommended to use the latter, as it is considered to be a more secure and convenient solution.

Quick Steps

  1. Log in to cPanel.
  2. In the SECURITY section of the cPanel home screen, click SSH Access.
  3. Click on Manage SSH keys.
  4. Create a new pair of SSH keys.

Configuring SSH keys For cPanel Basic Theme:

  1. In cPanel you can manage SSH keys in the SSH access menu.
  2. Click on Manage SSH keys.On the next page, you can either import the existing pair of keys or generate a new one.
  3. Create a new pair of SSH keys.3.1 Public and private keys generation in order to generate a new SSH key pair click on the Generate a new Key option.On the generator page, specify the password (passphrase), Key Name, Key Type and Key Size.DSA keys provide quicker key generation and signing times.RSA keys provide quicker verification times. The maximum allowed DSA key size is 1024 which is not enough to guarantee its security nowadays. That’s why we suggest using only RSA with 2048 bits.

    Once everything is set, click Generate Key. Now you should see both private and public keys you created.

    3.2 Public key authorization.

    In order to authorize SSH access to your hosting account by the private key you created, click on the Manage option.

    On the next page, click on the Authorize button.

    3.3 Acquiring a key pair.

    You can view and download keys you have in cPanel by clicking on the View/Download button.

    Click on Download Key or just copy/paste the provided key if needed. You can also convert your key into PuTTY’s ppk format using the Convert option.

  4. Use Putty and SSH key pair to connect
    In this example, we will use the Putty SSH client and key pair generated by cPanel in order to access the server via SSH.4.1 Download the Private key as it is mentioned under Acquiring a key pair ( in step3.3)4.2  In the PuTTy folder, run puttygen.exe.In the top menu select the File tab and click on Load private key and select your private  key file (make sure All files (*.*) filter is used so you can see your downloaded private key file

    Asked for the passphrase you specified during the key generation in step 2.1. After entering it you should receive a successful import message.

    In case you do not wish to set a passphrase for the key, you can empty the Key passphrase and Confirm passphrase fields.

    4.3 Now click on Save private key and save your key as a .ppk file which will be needed later.

    4.4  Run the PuTTy client (putty.exe), select Connection > SSH > Auth and in the Authentication parameters section, click on Browse to select the saved .ppk file.

    Once done, get back to the Session section and input the server name (IP address) and specify the SSH port and click Open.

    4.5 In the console window, you will be asked for the login and passphrase.

Conclusion

Remember to always keep your private keys safe. You can use the same key from multiple computers if you wish, or generate new ones on each client connecting to your server for added security. Each user should generate their own key pair and passphrase for secure access control.

How to Replace a WordPress Cron Job with a Real Cron Job

Your slow WordPress load time or failed scheduled posts could be caused by the default WordPress cron function. you can replace it with the operating system’s cron job (Unix/Linux) for improved performance. The actual cron job is the cron scheduler, which is a system process that automatically executes tasks for you in accordance with a predetermined schedule.

Cron is a Unix/Linux tool for scheduling commands or scripts to run periodically. A cron job is a task that schedules repeated actions. In WordPress, it’s managed by WP-Cron, which simulates a system cron. WP-cron is a virtual scheduling system in WordPress. It triggers tasks when a page is loaded but can fail for various reasons such as excessive site traffic and the following reasons.

  • Conflict of plugins
  • DNS-related issues
  • WordPress bugs
  • Use of caching plugins
  • Large server load

In such cases, the best option is to replace WP cron with a real cron job. Let us see how to do it.

Quick Steps

1. Log into cPanel and Navigate the Advanced section.
2. At the bottom click on Cron Jobs.
3. Add Cron Job.
4. Disable real Cron, wp-cron.php via the WordPress configuration file ‘wp-config.php’

How to Replace WP-Cron With a Linux Cron Job

The best way to optimize the efficiency of your WordPress cron jobs is to disable WP-cron which is enabled by default and set up a normal cron job through cPanel, which will run every hour.

Please log into your web hosting control panel, navigate to the “Advanced” section at the bottom or CPanel, and click on Cron Jobs.

cPanel interface cron job

cPanel interface cron job

Within the Cron Job panel, you can add a new task or view/amend existing tasks.

The settings available to trigger a task are:

* * * * * command to execute
│ │ │ │ │
│ │ │ │ │
│ │ │ │ └───────────────── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
│ │ │ └─────────────────── month (1 - 12)
│ │ └───────────────────── day of month (1 - 31)
│ └─────────────────────── hour (0 - 23)
└───────────────────────── min (0 - 59)
Note: In Cron Jobs "*" means "every"

When adding a new task you can select pre-defined time schedules from the first drop-down list, but we need something slightly different.

cPanel interface cron job

cPanel interface cron job

We need the process to trigger every 15 minutes which needs us to select “Once per 15 Minutes (*/15)” from the second drop-down list, then in each of the other boxes we just need * (Every).

We will use the “wget” command which is a free software package for retrieving files using HTTP, HTTPS, and FTP, the most widely-used Internet protocols. It is a non-interactive command-line tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.

The code that we need to execute is

wget -q -O - http://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

You will need to change example.com to the specific domain of your WordPress installation.

Disabling wp-cron.php

You can disable WP-cron by modifying the wp-config.php once a cron job is added with the above steps. The wp-config.php is located in the folder where WordPress is installed. Open the wp-config.php file, add a new line after <?php, then add the following code on the new line

define('DISABLE_WP_CRON', true);

How to test

Set up a new test post that is scheduled for 20 mins in the future and wait. If WordPress has automatically published the post then everything has worked as planned.

Conclusion

Congratulations! You have learned how to set up a WordPress cron job and replace WP cron with a real cron job.

How to Disable Directory Listing in cPanel

If you’ve ever visited a URL that leads to a directory that does not have an index file, you’ve probably seen a list of the files in the directory. This means indexing is turned on for that online folder.

This is the default configuration for most web servers. In most cases, though, we don’t want to display the contents of a directory. Leaving files publicly visible is a security and privacy risk.

In this tutorial, we will show you how to disable directory listing using cPanel.

There are several ways to turn off directory indexing using cPanel. We’ll start with configuring the indexes directly.

Quick steps

  1. Log in to cPanel.
  2. In the “Advanced” section, click the Indexes link or icon.
  3. To configure a directory to turn indexing on or off click the EDIT button.
  4. Select No Indexing and click Save

Disable Directory Listing in cPanel

Log in to cPanel. In the “Advanced” section, click the “Indexes” link or icon.

Indexing option in cPanel interface

Indexing option in cPanel interface

You’ll see the directory structure for your website.

To enter a directory, click the folder icon.

Indexing option in cPanel interface

Indexing option in cPanel interface

In this tutorial, we’re going to turn indexing off for only one directory. So we’ll click the folder icon for public_html/test.

Once we’re in the public_html directory, we’ll click the EDIT button of the directory test where we want to turn off indexing.

Indexing option in cPanel interface

Indexing option in cPanel interface

Select the No Indexing option and click the Save button.

Indexing option in cPanel interface

Indexing option in cPanel interface

The other available options

Inherit

Select this mode to use the parent directory’s setting. If the index settings are not defined in the parent directory, the system will use its default settings.

No Indexing

No files will appear in this directory if a default file is missing.

Show Filename Only

This mode shows a simple list of the files present if the default file is missing.

Show Filename and Description

This mode shows a list of files and their attributes: file size and file type.

The success message should say, “…indexes are now: Off”

Indexes option in cPanel

Indexes option in cPanel

Using cPanel File Manager to Disable Directory Listing in cPanel

Our destination here is the same as the previous method, but we’re taking a different route to get there. If you work in the cPanel File Manager a lot, you may prefer this method.

In the Files section of cPanel, click the File Manager link or icon.

File Manager option in cPanel

File Manager option in cPanel

You want the directory name to be in the right panel. So for our example, we click public_html in the left pane to get our demo directory listed on the right.

Click the directory name to select it, then right-click. Mac users may use CMD+click to open this list.

From the drop-down menu, select Manage Indices.

File Manager option in cPanel

File Manager option in cPanel

Now we’re back at the same Indexes page that we saw in the first method.

Select the No Indexing option and click the Save button.

Indexes option in cPanel

Indexes option in cPanel

Conclusion

You learned How to Disable Directory Listing in cPanel.

Accessing Webmail for Your Domain with cPanel

In this article, we will walk you through on how to access the Webmail interface for accessing email accounts for cPanel hosting accounts.

Webmail is an email application accessible via a web browser. It allows you to view your email accounts on any device as long as there’s an internet connection. You can compose and read e-mail messages, maintain an address book, and perform other common tasks. Offline e-mail client applications, such as Thunderbird and Microsoft Outlook, generally provide more features than webmail applications but also require more initial configuration.

The cPanel webmail account is accessible in three different ways ‒ using the server’s IP address,  your domain name, or through the control panel’s Email Accounts section.

Quick steps:

Accessing Webmail Through the Server’s IP Address

  1. Find out the server’s IP address provided by your hosting provider.
  2. Enter the URL
    https://server_ip:2096 (HTTPS port) or http://server_ip:2095 (non-HTTPS port)
  3. Provide credentials and hit Log in

Accessing Webmail Through Your Domain Name

  1. Open your web browser and use any of the following URLs
    https://yourdomain.com/webmail/
    https://yourdomain.com:2096
    (HTTPS port)
    http://yourdomain.com:2095
    (non-HTTPS port)
  2. Provide credentials and hit Log in

Accessing Webmail via cPanel’s Email Accounts Section

  1. Login to cPanel
  2. Navigate to Email > Email Accounts
  3. Click on Check Email of the required account

Let us see each of these methods in detail below.

 

Accessing Webmail Through the Server’s IP Address

This method makes use of a server’s IP address that your hosting company provides.

Open your web browser and enter any of the following URLs:

Replace server_ip with the actual server IP address

https://server_ip:2096 

or

 http://server_ip:2095

It will automatically be redirected to the server hostname and you can access the Webmail login page. You will be required to enter your email address and password there.

This is how the webmail login page should appear:

Webmail login page

 

Accessing Webmail Through Your Domain Name

Remembering the IP address to access webmail may not be practical every time. So you can use your domain name in the following format

yourdomain.com/webmail

It will also function if you replace /webmail with the port number.

For a non-HTTPS port, use yourdomain.com:2095 for an HTTPS port, use yourdomain.com:2096.

Note: Your domain should be directly pointed to the server IP address in this case.

 

Accessing Webmail via cPanel’s Email Accounts Section

Log in to your cPanel interface. In the EMAIL section of the cPanel home screen, click Email Accounts.

 

Email Accounts section in cPanel

 

Under Email Accounts, locate the email account that you want to access, and then click Check Email

Check Email option in cPanel

If this is the first time you are accessing webmail for the account, select the webmail application that you want to use.  You’ll see two webmail applications to choose from ‒ Roundcube and Horde.  The default choice for Veerotech users is Roundcube.

 

Roundcube selection in cPanel

The webmail interface appears.

Webmail interface

 

Conclusion:

Congratulations, you have now learned how to access the Webmail interface in your web browser.

How to log in and log out of cPanel

In this guide, we will show you how to log into cPanel and manage your hosting account. There are three main ways to do so using the cPanel interface.

Quick Steps:

Using the management portal:

  1. Log in to the Customer/Client Portal
  2. Click My Services under the Services section.
  3. Click on Manage Service of hosting package’s more options
  4. Click Login to cPanel.

Using your domain name:

  1.  Enter the domain and the 2083 port in your preferred browser.
  2. Enter the username and password in the login page
  3. Click on Log in

Using your shared IP address:

  1.  Enter the shared IP address and the 2083 port in your preferred browser.
  2. Enter the username and password on the login page
  3. Click on Log in

Accessing your cPanel interface using the  Management Portal is always the preferred method.

Log in to the Customer/Client Portal using the URL https://manage.veerotech.net/clientarea.php. On the menu bar, click Service, and then click My Services in the Dashboard.

 

Under your Product/ Service, locate your hosting package and then click on Manage Service.

 

 

In the Actions sidebar, click Login to cPanel.

 


The Customer/Client Portal immediately logs you into your cPanel account in a different window.

Access cPanel directly Using your Domain Name

Only if you know your cPanel password directly

This will only be possible after your domain name is operational and points to our DNS servers.

In your web browser, type the cPanel address for your website. The address is either http://www.yourdomainname.com:2082 or https://www.yourdomainname:2083, where yourdomainname.com is your domain name.

The cPanel login page appears:

In the Username and Password box, type your account username and password. Then click Log in. When you enter the correct username and password, the cPanel home screen appears

Using the shared IP Address

Only if you know your cPanel password directly.

If your domain has not yet propagated or does not point to our DNS servers, this is the only option to access cPanel.It would look something like this- http://xx.xx.xx.123:2083 , where xx.xx.xx.123 is the IP address assigned to your hosting account in the welcome email.

Logging out of cPanel

When you’ve finished using cPanel, log out to notify the web server that your session is over. If you do not log out, the server will automatically end your session after a certain amount of time has passed.

In the top-right corner, click LOGOUT:

Conclusion

Congratulations! You have learned how to log in and log out of cPanel.

How to Change cPanel Language

In this guide, we will walk you through how to change the cPanel language.

cPanel is a control panel with a simplified web-based interface that is used to control and manage web hosting servers.  In this article, we will show you how to change the cPanel interface language.

Quick steps:

  1. Login to the cPanel
  2. From the home screen click on  Change Language.
  3. Select the language you are comfortable with from the dropdown list and click Change.

Changing the cPanel language

Once you are logged in to your cPanel interface, click on the Change Language option from the Preferences section. Alternatively, you can search for ‘Change Language’ on the search bar of your cPanel interface.

On the next page select the preferred language from the dropdown list and click Change.

Conclusion

Congratulations! You have learned how to Change the cPanel Language.

How to Reset the Admin User Password for NextCloud

In this guide, we will walk you through the steps required to recover/reset Admin User Password for NextCloud

Method 1: Use the password reset link on the login screen.

The reset link will only appear after a failed login attempt and works only if you have entered your email address on your Personal page in the Nextcloud Web interface so that the Nextcloud server can email a reset link to you.

Method 2:  Using the occ command.

Step 1: Log in to shell access using cPanel >> terminal for the account

Step 2: Locate the path for ‘occ’ file and make the file execution permission

             chmod 755 occ 
             or
             chmod +x occ

Step 3: List user for NextCloud

             ./occ user:list

Step 4: Reset the user password

./occ user:resetpassword USERNAME
Change the “USERNAME” with the corresponding user for which you want to reset the password


Example
: ./occ user:resetpassword admin

Enter a new password:
Confirm the new password:
Successfully reset the password for the admin

Conclusion

Congratulations! You have learned how to reset Admin User Password for NextCloud.

How to Access Horde Webmail from cPanel

In this guide, we will walk you through how to access the Horde Webmail.

Horde is a free browser-based email application that allows you to read, send and organize your emails as well as manage and share calendars, contacts, tasks, notes, files, and bookmarks with your other email users.  In this article, we will show you how to log in to your email account using the Horde webmail application.

Quick steps:

  1. Login to the cPanel
  2.  From the home screen, click Email Accounts under the Email section.
  3. Click Check email
  4. Select Horde from the webmail interface and click open.

How to access Horde Webmail

Once you are logged in to your cPanel interface, select the Email account from the Email section of your choice.

On the next page click on Check Email on the right-hand side of the email account which you want to access the Horde webmail.

From the Webmail page, change your Webmail client to Horde and click open. This will takes straight to the Horde Webmail interface.

You can also log in to Webmail using the URL: https://www.example.com:2096. Where you need to use your domain name or the server hostname instead of the example.com. This link will directly take you to the webmail login page.

Conclusion

Congratulations! You have learned how to access the Horde webmail from within cPanel.

How to Change Windows 11 DNS Servers to use Google DNS

This guide will walk you through how to change the Windows 11 DNS servers and use Google public DNS servers.

Quick Steps:

Step 1: Open the Control Panel from the Start menu
Step 2: Click Network and Internet and then navigate to Network and Sharing Center
Step 3: Click Change adapter settings
Step 4: Right-click on your active network adapter & choose properties
Step 5: Choose Internet Protocol Version 4 (TCP/IPv4) and click properties
Step 6: Enter the new DNS servers into the boxes under “Use the following DNS server addresses”

Background

By default, Windows will obtain the DNS servers from your internet connection. In most cases, these would be DNS servers from your ISP. Many ISP’s tend to cache DNS entries longer than they should and do not update records properly. Because of this, you may wish to use Google’s public DNS servers (or other DNS servers).

Detailed Instructions

To modify your DNS servers within Windows 11 you’ll need to modify the network adapter properties. First, locate the Control Panel from within Windows. Next click on “Control Panel” from the search menu to open the Control Panel & then click “Network and Internet”

Then navigate to Network and Sharing Center.

After, you’ll open the Network and Sharing Center which will show basic network connection information. From here, on the left side of the page, click “Change adapter settings”.

After you’ve clicked “Change adapter settings”, you’ll be taken to the list of network adapters. You’ll want to locate your current adapter that is in use & right-click > Properties.

After clicking “Properties” you’ll need to locate the option for “Internet Protocol Version 4 (TCP/IPv4)” and then click “Properties”.

After clicking “Properties” from the previous step, you’ll now see the connection properties which have options for network settings including the option to specify DNS servers. As shown below, you can enter the Google public DNS servers into the bottom set of boxes titled “Use the following DNS server addresses”.

After entering the DNS servers you wish to use into the boxes, click “OK”. Please note, for these steps, you should modify ONLY the bottom two fields stating “Use the following DNS server addresses”.

Below are some public DNS servers. We recommend using either Google DNS or Cloudflare DNS. Prior to using the DNS servers, it is recommended to ensure these IP addresses are still in use.

Google Public DNS Servers

8.8.8.8

8.8.4.4

Cloudflare DNS

1.1.1.1

 

Conclusion:

You have now learned how to change the Windows 11 DNS servers and use Google public DNS servers. 

 

How to Limit or Disable WordPress Revisions

WordPress comes with a built-in feature that allows you to undo changes and go back to a previous version and this feature is called Post Revisions or simply Revisions. Most of us make mistakes when writing. Sometimes you might wish that you hadn’t deleted what you wrote earlier. Revisions allow you to fix that by going back in time and undoing the changes.

All post revisions are stored in your WordPress database. Due to this, many users worry that too many revisions can slow down their websites. You can still control and limit post revisions in WordPress. We’ll show you three different methods to do that you can choose one that best suits you.

Quick steps:

Limit post revisions in WordPress using plugin

  1. The first thing you need to do is install and activate the WP Revisions Control plugin.
  2. Then you need to visit the Settings » Writing page and scroll down to the WP Revisions   Control section.
  3. Enter the number of revisions you want to store for each post type.
  4. Click on the ‘Save Changes’ button

Limit WordPress post revisions manually

  1. Login to your cPanel
  2. Access the cPanel File Manager Code Editor and navigate to your wp-config.php file
  3. Enter the following code towards the top of the wp-config.php file:
    define(‘WP_POST_REVISIONS’, 3);
  4. After that click on Save Changes at the top-right.

Completely Disable WordPress Post Revisions.

  1. Login to your cPanel
  2. Access the cPanel File Manager Code Editor and navigate to your wp-config.php file
  3. Enter the following code towards the top of the wp-config.php file:
    define(‘WP_POST_REVISIONS’, false );
  4. After that click on Save Changes at the top-right.

Method 1: Limit post revisions in WordPress using a plugin

The first thing you need to do is install and activate the WP Revisions Control plugin.

Upon activation, you need to visit the Settings » Writing page and scroll down to the WP Revisions Control section.

From here you need to enter the number of revisions you want to store for each post type and then click on the ‘Save Changes’ button to store your settings. WP Revisions Control will now limit the post revisions stored in your WordPress database.

The plugin also allows you to delete revisions for an individual post. Simply edit the post where you want to delete revisions and scroll down below the editor.

You can limit the revisions for this post only or delete them by clicking on the ‘Purge these revisions’ button.

Method 2: Limit WordPress post revisions manually.

Access the cPanel File Manager Code Editor and navigate to your wp-config.php file.

To limit post revisions, simply add this code to your WordPress site’s wp-config.php file.

Method3: Completely Disable WordPress Post Revisions.

We don’t recommend completely disabling WordPress post revisions. However, some users may want to disable revisions to reduce their WordPress database size.

The easiest way to do this is by installing Disable Post Revision plugin.

Upon activation, go to the Settings » Writing page and select the post types where you want to disable the revisions feature.

Don’t forget to click on the save changes button to store your settings.

Conclusion:

We hope this article helped you learn how to use WordPress post revisions to undo changes and how to manage post revisions for larger sites.