Tag Archive cPanel Hosting

How to change PHP version and update PHP extensions on Shared servers

How to change PHP version and update PHP extensions on Shared servers

In some cases, the correct functioning of your website depends on a PHP version installed on the server.
This guide describes how to change php version on Shared servers (Stellar, Stellar Plus plans and old Value, Professional, Ultimate plans). For Business SSD servers, use this guide.

Thanks to the PHP Selector function, it is possible to select the necessary PHP version as well as enable/disable certain PHP modules and functions.

To check what PHP version is currently in use, refer to this article.

Change PHP version and/or manage extensions

1. Log into your cPanel account.
2. Scroll down to the Select PHP Version:
For cPanel Basic Theme:
How to change PHP version and update PHP extensions on Shared servers

How to change PHP version and update PHP extensions on Shared servers

For cPanel Retro Theme:

How to change PHP version and update PHP extensions on Shared servers

3. Here you will see the list of available modules and extensions.

If you do not need to change the PHP version and just want to turn on/off specific extensions, you can do this by checking/unchecking the corresponding boxes.

Use the PHP Version drop-down box to select the required version, click on Set as current in order to apply the changes.

NOTE: The ‘native’ PHP version does not allow changing any options. You can set the desired values using a php.ini file:

How to change PHP version and update PHP extensions on Shared servers

4. To change individual settings within the PHP version in question, click on Switch to PHP Options.

By clicking on one of the options in grey, you will be presented with a drop-down list to change specific settings. Hit Apply to implement the settings:

How to change PHP version and update PHP extensions on Shared servers

NOTE 1: It is recommended to update your website scripts and use PHP 5.6. If the latest software you run for your websites is not yet compiled for PHP 5.6, please contact the script vendor for a compatibility patch.

NOTE 2: If you used a php.ini file for editing your account PHP configuration before, you will need to replicate the custom values using PHP Selector tool.

NOTE 3: In order to increase the max upload size, make sure to modify both post_max_size and upload_max_filesize values.

NOTE 4: max_execution_time can be increased up to 300 seconds.

Change PHP version for addon domain

Sometimes your website may need to use a different PHP version from the one assigned to your domain on your cPanel account.

To set a different PHP version for an addon domain, you need to add a special code to your .htaccess file. To do this, follow the steps below.

1. Find the .htaccess file for the addon domain in question. The steps for how to find it can be located here.

2. Add the following line to your .htaccess file:

<FilesMatch ".(?:html|php)$">
SetHandler application/x-lsphpXX
</FilesMatch>

where XX is the PHP version you wish to set. It can be 52, 53, 54, 55, 56, 70, 71,72, or 73.

For example:

How to change PHP version and update PHP extensions on Shared servers

3. Click “Save changes”.

NOTE: When a different PHP version is set for the addon domain, there are no PHP extensions enabled by default. To make a website work correctly, you will need to upload a php.ini file to the folder of the addon domain. You can check this article (see point 6) to help you with uploading files to the hosting account.You can download the php.ini file for different PHP versions from the Attachments section at the end of this guide. Do not forget to rename the file to php.ini once it is uploaded to the hosting account.

Alternatively, you can run the command below via SSH:

cp /opt/alt/default_php_ini/phpXX.ini /home/cPanel_username/path_to_the_folder/php.ini
  • XX is PHP version you wish to set (it can be 52, 53, 54, 55, 56, 70, 71, 72 or 73),
  • cPanel_username should be replaced with your actual cPanel username, and
  • path_to_the_folder is a path to the folder of the addon domain.

For example:

How to change PHP version and update PHP extensions on Shared servers

You can find details on how to access a hosting account via SSH here.

The process is similar if you wish to set a different PHP version for a subdomain.

How to use Manage Shell in cPanel

How to use Manage Shell in cPanel

Secure Shell (SSH) is a cryptographic network protocol that is used to log into the system via a secure channel. With the help of SSH, you can safely exchange data between two devices. For more detailed information, visit here.

Enabling SSH access allows for:

  • Remote hosting control
  • The ability to add, remove, edit, backup and restore hosting files and directories
  • The easy import and export of your database
  • An established connection between 2 different servers

However, there are some downsides with enabling SSH:

  • More difficult to use than a web interface
  • Increased security risks

 

The Manage Shell plugin provided by Namecheap allows you to enable or disable SSH access for your respective hosting accounts with just a few clicks.

For cPanel Basic Theme:

Firstly, locate the Manage Shell plugin from your cPanel:
cPanel >> the Exclusive for Namecheap Customers section >> Manage Shell:

How to use Manage Shell in cPanel - Cheap VPS

By default, SSH access is disabled for hosting accounts.

How to use Manage Shell in cPanel - Cheap VPS

There are 3 options related to enabling SSH keys:

  • Managing SSH keys
  • Generating a new key
  • Importing a key

All these options will take you to the SSH Access menu in your cPanel. Detailed instructions can be found in this guide.

To enable SSH, turn the toggle button on. After it has been enabled, you will then see how you can manage your SSH.

How to use Manage Shell in cPanel - Cheap VPS

Feel free to explore more about SSH clients here.

For cPanel Retro Theme:

Firstly, locate the Manage Shell plugin from your cPanel:
cPanel >> the Exclusive for Namecheap Customers section >> Manage Shell:

How to use Manage Shell in cPanel - Cheap VPS

By default, SSH access is disabled for hosting accounts.

How to use Manage Shell in cPanel - Cheap VPS

There are 3 options related to enabling SSH keys:

  • Managing SSH keys
  • Generating a new key
  • Importing a key

All these options will take you to the SSH Access menu in your cPanel. Detailed instructions can be found in this guide.

To enable SSH, turn the toggle button on. After it has been enabled, you will then see how you can manage your SSH.

How to use Manage Shell in cPanel - Cheap VPS

Feel free to explore more about SSH clients here.

What is a VPS?

What is a VPS?

What is a VPS?

With a VPS, you open a world of possibilities that would not be possible on shared hosting because of restrictions.

VPS stands for Virtual Private Server. This refers to the partitioning of a physical server into multiple servers. In effect, each one acts just like a dedicated server, you get all the features of a dedicated server but at a lower price. Each VPS has its own operating system, and each can be rebooted separately. These operating systems each receive a specific share of the resources of the physical server, no more and no less, they are isolated from each other so that one cannot interfere with another. If one VPS experiences problems or tries to use too much memory or CPU resources, it has no effect on the others.

There are many advantages to selecting a VPS, it costs less than a fully dedicated server and provides a great deal of freedom and flexibility over the limitations and restrictions of shared hosting. You are limited only by the capabilities of the VPS, so select one powerful enough to meet your needs. You can always upgrade later if you decide it becomes necessary.

As for virtualization technologies we offer KVM VPS servers.

Since you are supposed to manage your VPS yourself, we recommend you have a good understanding of Linux commands and are familiar with the WHM/cPanel control panel. You can get a VPS without WHM/cPanel, but in this case, you would need to have very advanced knowledge of Linux.

If you don’t feel you have the technical expertise necessary to manage your own VPS, there is no need to let that stop you – you can select full management for an additional fee.

You won’t have root access, and it will act much like a shared hosting plan, but you will still make the decisions.

cPanel is required if you choose full management for a VPS.

How to reset WordPress admin password

How to reset WordPress admin password

There are three ways to reset a lost WordPress dashboard password:

Using the Lost Password option
Using Softaculous Apps installer
In the database

Using the Lost Password option

1. Open your WordPress administrative login page – it is usually located in http://yourdomain.com/wp-admin.

2. Click on the Lost your password? option, fill out the username or email address > Get New Password:

How to reset WordPress admin password

How to reset WordPress admin password

3. Log into your email account, which is set as your administrative WordPress contact. You can find the email message with the password reset URL there, click on it:
How to reset WordPress admin password

4. Enter your new strong password twice on the opened page > Reset password:

How to reset WordPress admin password

Using Softaculous Apps installer

In order to change the password for your WordPress admin user, follow next steps:

1. Log into cPanel and navigate to Softaculous Apps Installer menu:

How to reset WordPress admin password

2. In the Softaculous interface find All Installations icon in the top right corner:

How to reset WordPress admin password

3. In this menu you will see Scripts Installations list. Select the one you need to change the admin password for and click on Edit Details (pencil icon) next to it:

How to reset WordPress admin password

4. Next you will see installation details page. Scroll down to Admin Account section. Here you need to enter your current username and the new password in Admin Password field:

How to reset WordPress admin password

5. Once done, scroll down to the bottom of the page and hit Save installation details button:

How to reset WordPress admin password

6. After that you will receive the message about the successful update:

How to reset WordPress admin password

Feel free to log in to WordPress admin panel using the new password.

Reset the password via the database

If Lost your password? confirmation emails do not arrive, or if you have no access to the email account linked to your administrative dashboard, you can reset your password via MySQL database:

1. Log into your cPanel > section Files File manager and navigate to the document root of your WordPress website:

How to reset WordPress admin password

2. To check what database is used for your WordPress website, open the wp-config.php file located in:

How to reset WordPress admin password

3. Go to cPanel > Databases section > phpMyAdmin:

How to reset WordPress admin password

4. Select the database in question, table wp-users and click on Edit next to the admin user:

How to reset WordPress admin password

5. On the next page, type in your new strong password into the user_pass box, select MD5 in the Function column and click Go:

How to reset WordPress admin password

You can now go back to the WordPress dashboard page and try to log in with the new password.

 

How to install WordPress using Softaculous

How to install WordPress using Softaculous

Once you order hosting service, you can start creating your own website. Using Softaculous automatic app installer you can install WordPress in a few clicks.

Below you can find step-by-step guidelines covering the process:

1. Log into your cPanel.
2. Navigate to Exclusive for Namecheap customers section > Softaculous Apps Installer menu:

How to install WordPress using Softaculous
3. On the homepage, click on the WordPress icon:

How to install WordPress using Softaculous

4. Switch to the Install tab to proceed:

How to install WordPress using Softaculous

5. On the next page you will need to fill out the details of your WordPress installation.

  • Choose the domain you wish to install WordPress for
  • In the In Directory field you can specify the root folder for WordPress installation. By default, this field is empty, and it allows installing WordPress on yourdomain.com directly. If you wish to install it to a subfolder, like yourdomain.com/blog, simply type “blog” in this field.
  • Database Name can be left default.
  • Table Prefix can also be left default wp_; however, due to security reasons it is better to change it, e.g., to ncwpsite_ .
  • The Site Settings section should be filled out accordingly to your needs, though you can change it anytime later if required.

Make sure you set up secure and hard-to guess details in the Admin Account section:

How to install WordPress using Softaculous

How to install WordPress using Softaculous

How to install WordPress using Softaculous

6. When ready, scroll down and hit Install.
In a few moments you will see the message that WordPress has been successfully installed:

How to install WordPress using Softaculous

 

You can now go ahead and log into your WordPress Dashboard to start working on your website.