Author Archives: jay

What is CPU usage and how do I monitor it?

The Central Processing Unit (CPU), or processor, is the portion of a computer system that carries out the instructions of a computer program.

CPU time is the amount of time a computer program uses while processing CPU instructions.

The CPU time is often measured in seconds, while the CPU usage – by the percentage of a specified overall capacity.

In terms of your web hosting account, CPU usage is the percentage of the capacity of the server’s CPU that your account is generating.

Each web hosting account has a certain CPU usage limit. You can find out the exact CPU limit in the Account Usage table located on the left side of the Control Panel.


Account Usage table - CPU usage

You can monitor the CPU usage of your account via the Statistics > CPU Stats section of the Control Panel.

Once you open that menu, the CPU usage table is displayed. By default, the monthly account usage is displayed.

The columns in the table are as follows:

Day – you can click on each date for detailed information.

CPU Time – the amount of time the CPU has been processing instructions on behalf of your web hosting account.

Execution time – the amount of time applications from your web hosting account have been running.

CPU Usage – the percentage of the capacity of the server’s CPU used up by applications from your web hosting account.

Average Memory – the server memory used up by applications from your web hosting account during the execution time.

Processes – the number of processes that have been running during the reviewed period.

If you click on a particular day, you will see the same set of statistics displayed on an hourly basis.

It is recommended that you review other articles about CPU usage that provide detailed information on how it is calculated, how it affects the account and how to reduce it.

You also have the option to purchase additional CPU usage. For more information, please review the article “How can I upgrade my hosting plan?“.

High CPU usage caused by WordPress

WordPress is a content management system written in PHP. This means that the content it serves is generated dynamically by a set of PHP scripts: every time a visitor arrives at your website, WordPress processes the request and generates a response.

Clearly, responding to a request implies a certain use of server resources: one has to look at the request itself, determine what the visitor wants to access, fetch it from the database, generate the HTML response, and so on.

With this in mind it is not difficult to find out what are the reasons why we can see high CPU usage on the server:

– You get too many requests. If a lot of users come to your website at the same time, or you receive many illegitimate requests (someone’s probably attacking your site), WordPress will have to process all those requests and, therefore, the use of server resources will increase.

– Requests are slow to resolve. If you have a lot of plugins installed or some of your plugins is inefficient for whatever reason, all the requests you get will take longer than needed, because WordPress will run a lot of inefficient code.

Analyzing the problem

First you need to locate the website which is causing the problem, especially if you have more then one WordPress sites installed.

For the purpose, please check the Statistics block on the hosting control panel home page (Dashboard). If you sort the sites by Hits you can easily locate the most visited one.

Then you can find more details about the traffic and if there is any unusual behavior from the Web Statistics section of your control panel. 

Another great tool to locate a high resource consuming website is the MySQL Stats 

After that you have to identify why CPU usage has increased on our website. Has the number of requests to our website increased? Is it now slower to serve individual requests?

Solving the problem

Once of the first things you should try is to get a cache plugin installed. Once of the most popular ones is W3 Total Cache 

This great plugin also allows you to to setup Memcached for your WordPress for additional optimization. Check out our WordPress with Memcached article. 

Another great tool to analyze your WordPress performance is the Query Monitor plugin. 
It enables debugging of database queries, PHP errors, hooks and actions, block editor blocks, enqueued scripts and stylesheets, HTTP API calls, and more.

Sometimes the reason for high CPU usage could be the so called Bad Bots. Bad bots are any bot that hit your website at no benefit to you. These bots consume server resources especially if they hit your website or wp-login page excessively.

One of the great plugins lately is Wordfence and using this plugin you can easily view and block any of those bots and add an extra layer of security to your WordPress along the way.
Wordfence includes an endpoint firewall and malware scanner that were built from the ground up to protect WordPress.

Please check the official WordPress optimization instructions page as well. 

How to create a mailbox?

You can create mailboxes at any of your hosted domains.

To create a mailbox go to Email > Mailboxes in your Control Panel. On the right you see a Create A New Email Account button.

After you click on it, you see several text boxes that you need to be filled in.

Email address – Here you enter the name for your mailbox, which is the part of your email address before the @. Next you choose one of your hosted domains from the drop-down menu on the right. The domain would be the part of your email address after the @.

Password – Here you need to enter the password for your mailbox. You will be using this password to login to the webmail and also when you setup your email account in Outlook and other email clients. You can enter a password using the symbols a-z and 0-9. The password should be between 3 and 32 symbols long. You can use a random password by pressing “Generate password” button.

Forward email – If you select this option, you will be able to enter an email address where all messages received in your new mailbox will be forwarded to. There is also a “Save a copy” option. If you select it, a copy of every message that is forwarded will also be saved in this mailbox. You will be able to setup email forwarding later.

Use Autoresponder – Select Auto-Reply option if you want to enter an auto-reply message, which would be sent back to anyone who sends you an email. Usually this option is used to setup a message informing people that you are on vacation, for example, so it is unlikely that you need this right now. You can setup an auto-responder at any time. (see: How to set an auto-reply message to my e-mail account?)

When you are ready, you can click the Add a Mailbox button to create the mailbox. It will appear in the list of Mailboxes.

You may also find these articles helpful:

Why my website is loading slow?

In this article we will cover some of the reasons why your website loading is slow.

Unoptimized Images
A large volume of unoptimized images is usually the most common reason behind website slowness. High-resolution images can consume lots of bandwidth while loading. Uploading larger sized images and then scaling them down can unnecessarily increase the size of your web page – causing your website to load slowly.

The image format is another important factor to consider. For example, JPEG images are much smaller in size compared to other image formats like PNG or GIF. Quite naturally, your web page will load faster if you are using JPEG images instead of PNG/GIF.

Solutions:

– Check the file size of your images, anything above 1MB is really unacceptable.
– Use JPEG instead of PNG, especially for larger images. Icons are ok.
– Use waterfall tests to easily scan image sizes and take corrective action.

JavaScript Issues
The availability of JavaScript/jQuery plugins has made it really convenient to add dynamic content to websites. However, if implemented incorrectly, JavaScript can cripple your website’s page load speed.

Solutions:

– Audit your JavaScript scripts to see what you really need and remove the rest.
– Consider using something like Google Tag Manager – a single script for all your tools.

Excessive HTTP Requests
Having loads of JavaScript, CSS, and image files can lead to too many HTTP requests. When a user visits your web page, the browser performs several requests to load each of these files – which can significantly reduce the page load speed.

Solutions:

– Reduce the number of files on your pages where possible. Includes CSS, images, javascript.
– Minify your CSS and Javascript files reduces the number of total files users will have to download.

Not Making Use of Caching
Whenever you visit a website, certain elements are stored in a cache, so the next time you visit the site it can easily access those parts and load much faster. With caching, instead of your browser having to download every single resource, it only has to download a few of them.

By turning on caching you can considerably improve your site’s loading for return visitors. If you’re using a CMS like WordPress you can install a plugin like W3 Total Cache, either of which will let you enable sitewide caching, or caching of certain site elements.

Another great tool for speeding up dynamic database-driven websites is Memcached. Memcached reduces that load by storing data objects in dynamic memory.
For more details see the following articles as well:

– How to use Memcached? 
– How to Enable Memcached on WordPress? 
– How to Enable Memcached on Joomla ? 


Too Many Ads
No doubt display advertisements are great for monetizing your websites traffic.

But that shouldn’t come at the cost of compromised performance or user experience. Don’t let too many ads be another reason why your website is slow!

The most obvious impact of overloading your website with advertisements is the addition of HTTP requests, which would need additional processing time.

Especially the rich media ads – like pop unders, interstitials and auto downloads – may create hundreds of HTTP requests making your website unresponsive.

How To Enable SSL (HTTPs) for your website?

Website visitors are becoming more aware of the importance of secure data transfer, and they often look for the green lock that appears in their browser on HTTPs-enabled websites.

Before you can have your website loading at https:// instead of http:// you need to have SSL certificate installed for your domain.

You can get one from the hosting control panel -> My Domains -> SSL Certificates

The options are either to Order SSL certificate or Request Let’s Encrypt certificate.

Once you have installed the SSL, please allow up to 1 hour for the new SSL IP propagation!

After you have enabled SSL certificate on your domain name, you will need to set up a redirect for your website to use SSL and HTTPs protocol.

The procedure is valid for any static or dynamic website, which does not have a configuration for the URL it is installed on, like WordPress.

If you need to enable HTTPs for your WordPress site, please see the How To Enable SSL (HTTPs) in WordPress article.

First, go to Files -> File Manager in your hosting control panel and navigate to your domain root folder, usually /www/mydomain.com/

If there is no file called .htaccess created, then create one using the New File button.

Edit the .htaccess file and place the following code at the top:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Click Save.

Once you do this, your website is now fully setup to use SSL / HTTPS.

How to Enable Memcached on WordPress

In this guide, we’re going to use the free extension W3 Total Cache to configure WordPress with Memcached.

If you’re already using another extension such as WP Super Cache, you’ll need to deactivate this and install the W3 Cache in order to follow this guide.

Here are the steps to follow to configure W3 Total Cache with Memcached:

1. Sign in to your WordPress dashboard
2. In the main menu, go to Performance then click on General Settings
3.  Activate Memcached for the following options:

– Page Cache Method
– Minify Cache method
– Database cache method

-> Save the settings

For Memcached hostname:port / IP:port use: /home/sys/memcached.sock:0

Save the settings and you’ve successfully enabled memcached on your WordPress website.

How to use Memcached?

The Memcached system is used by some of the most traffic heavy sites such as YouTube, Facebook, Twitter.

It is also supported by some popular CMSs such as Drupal, Joomla, and WordPress.

To use Memcached with PHP, please enable memcached extension from the control panel at Advanced -> PHP Settings -> Edit php.ini -> memcached On.

To have Memcached enabled your plan needs to have Memcached instances available. In case you need to add one or more, you can purchase it as an upgrade from the Add/Upgrade service(s) section in the hosting control panel.

Each instance goes with 16 MB of memory which is why the Memcached instances go with Memcached memory.

Important: many applications require host and port to link them with Memcached. On our system the Memcached works on a Socket instead of Port.

In this case you need to use

Memcached hostname(IP): unix:///home/sys/memcached.sock
Memcached Port: 0

Example: $memcached->addServer(‘unix:///home/sys/memcached.sock’, 0);

How To Enable SSL (HTTPs) in WordPress?

After you have enabled SSL certificate on your domain name, you will need to set up WordPress to use SSL and HTTPs protocols on your website.

We will show you two methods to do that, and you can choose one that best fits your need.

Method 1: Setup SSL/HTTPS in WordPress Using a Plugin

This method is easier and is recommended for beginners.

  1. Log into the WordPress Dashboard.
  2. Roll your mouse over Settings in the navigation menu, then click General.
  3. In the WordPress Address (URL) field, enter your https address.
  4. Enter your https address in the Site Address (URL)  field. 
  5. Click the Save Changes button on the bottom of the screen. 

Once the settings are saved, WordPress will log you out, and you will be asked to re-login.

Then, you need to install and activate the Really Simple SSL plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings in the navigation menu, then click SSL. The plugin will automatically detect your SSL certificate, and it will set up your WordPress site to use HTTPs

The plugin will take care of everything including the mixed content errors. Here’s what the plugin does behind the scenes:

– Check SSL certificate
– Set WordPress to use https in URLs
– Set up redirects from HTTP to HTTPs
– Look for URLs in your content still loading from insecure HTTP sources and attempt to fix them.

Note: The plugin attempts to fix mixed content errors by using output buffering technique. It can have a negative performance impact because it’s replacing content on the site as the page is being loaded. This impact is only seen on first-page load, and it should be minimal if you are using a caching plugin.

Method 2: Setup SSL/HTTPS in WordPress Manually

This method requires you to troubleshoot issues manually and edit WordPress files. However this is a permanent and more performance optimized solution.

  1. Log into the WordPress Dashboard.
  2. Roll your mouse over Settings in the navigation menu, then click General.
  3. In the WordPress Address (URL) field, enter your https address.
  4. Enter your https address in the Site Address (URL)  field. 
  5. Click the Save Changes button on the bottom of the screen. 

Once the settings are saved, WordPress will log you out, and you will be asked to re-login.

Next, you need to set up WordPress redirects from HTTP to HTTPS by adding the following code to your .htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

If you want to force SSL and HTTPS on your WordPress admin area or login pages, then you need to configure SSL in the wp-config.php file.

Simply add the following code above the “That’s all, stop editing!” line in your wp-config.php file:

define(‘FORCE_SSL_ADMIN’, true);

This line allows WordPress to force SSL / HTTPs in WordPress admin area

Once you do this, your website is now fully setup to use SSL / HTTPS, but you will still encounter mixed content errors.

These errors are caused by sources (images, scripts, or stylesheets) that are still loading using the insecure HTTP protocol in the URLs. If that is the case, then you will not be able to see a secure padlock icon in your website’s address bar.

Majority of the incorrect URLs will be images, files, embeds, and other data stored in your WordPress database.

All what you need to do is find all mentions of your old website URL in the database that started with http and replace it with your new website URL that starts with https.

You can easily do this by installing and activating the Better Search Replace plugin.

How to Enable Memcached on Joomla

You can speed up your Joomla site by using memcached.

To enable memcached on Joomla, you need to modify a few settings in your Joomla configuration.php file first.

You can find this file in your Joomla site’s root folder. Using your favorite FTP software, edit this file and find the following lines:

public $caching = ‘0’;
public $cache_handler = ‘file’;

Change these lines to the following:

public $caching = ‘2’;
public $cache_handler = ‘memcache’;

Then, immediately after the two lines you edited, add these two lines:

public $memcache_server_host = ‘/home/sys/memcached.sock’;
public $memcache_server_port = ‘0’;

After you are done making all the changes, save the configuration file.

Configure Memcached in Joomla Settings

Now, we will configure memcached on our Joomla-based website.

Login to your Joomla site’s admin panel and navigate to System -> Global Configuration.

Click on the server tab at the top and scroll down to Cache Settings. From the drop-down menu select Persistent(Memcached).

Note: Make sure to enter the correct Memcached server host and port for your server.

Memcache(d) Server Host: /home/sys/memcached.sock
Memcache(d) Server Port: 0

Save the settings.

You’ve successfully enabled memcached on your Joomla website.

I cannot delete a file/folder in my account. How do I solve this?

When attempting to delete a file or folder, you may encounter an error if its permissions do not allow removal. This applies to both individual files and directories.

If you are trying to delete a folder, the issue may not be with the folder itself, but with one or more files or subfolders inside it that have restrictive permissions.

To resolve this issue, you need to update the permissions of the affected file. If the problem involves a folder, you may need to change the permissions for the folder as well as all files and subfolders contained within it.

Set the permissions to 755. Once these permissions are applied to the file or folder (including its contents), you should be able to delete it using the File Manager (Files → File Manager) or via FTP.

If you don’t know how to change the permissions of a file or a folder, please refer to this article: How to change the permissions of a file or a folder?