Sélectionner une page

Divi Hosting Requirements | Elegant Themes Blog


Hosting your Divi website on a reliable server is crucial for site speed, security, and health. To do that, you need a hosting provider that meets certain requirements. Thankfully, Most hosting companies are familiar with hosting WordPress websites. So, they should have the basic hosting configuration you need to get your site up and running. However, if you are looking for optimal server settings for Divi sites specifically,  you’ll need to make sure your host is meeting the specific Divi hosting requirements we share in this post. For most of you, a quick system status check inside Divi will be all the confirmation you need. But for those that run into any problems and/or want to optimize those settings, we’ll show you how to make the changes you need and more.

If you want perfectly configured hosting environments pre-installed with the tools you need to be successful with Divi, check out Divi Hosting. We’ve partnered with leading companies in the WordPress Hosting industry to bring you the most reliable, Divi-compatible hosting.Check Out Divi Hosting

Divi Hosting Requirements (the List)

divi hosting requirements

Divi is a powerful WordPress theme and page builder with a robust set of design tools. In order to make sure Divi is functioning optimally on your server or host, we’ve provided the following Divi hosting requirements.

  • PHP Version = 7.4 minimum (8.0+ recommended)
  • memory_limit = 128M
  • post_max_size = 64M
  • upload_max_filesize = 64M
  • max_execution_time = 120
  • max_input_time = 60
  • max_input_vars = 1000
  • display_errors = 0

In addition to these server settings, we also recommend the following:

  • Divi Version = latest
  • WordPress Version = 5.3 or higher
  • Database = MySQL version 5.7 or higher; MariaDB version 10.2 or higher

Keep in mind that the list of hosting requirements above are not “required” for Divi website to function. It is more of a guideline to help Divi function at its best.

Now we’ll go over each of these in more detail.

Divi Hosting Requirements Explained

divi hosting requirements

1. PHP Version

The first hosting requirement on our list is the PHP version. Most of the settings in the list directly relate to runtime configuration for PHP (i.e. memory_limit, max_execution_time, etc.) which we’ll cover next. For now, it seems appropriate that we take time to understand the crucial role PHP plays in website performance and the need to keep it updated.

The Performance Role of PHP

A WordPress server stack (the components needed to power a WordPress/Divi website) commonly consists of four major components:

  • an operating system (usually Linux)
  • a web server (usually Apache or NGINX)
  • a database (MySql or MariaDB)
  • and PHP (the server-side scripting programming language for web development)

Of these four components, PHP is perhaps the most influential to the performance of your website. Here is why.

Unlike static HTML sites, WordPress is a dynamic CMS that uses PHP (a scripting language) to retrieve data stored in a database in order to display that data onto a webpage. This makes managing your site easy, but the downside is that it takes longer for pages to load because it has to locate the data in the database before loading the page. Think about it.  Every time you load a webpage in your browser, PHP has to process what the server needs, find it in the database, and then deliver it back in HTML (so you can see it on your browser). So if loading your website requires a lot of PHP requests, your page will inevitably slow down.

In conjunction with WordPress, Divi also relies on PHP to deliver Divi Builder content and designs to your page. Divi does this quickly and efficiently with a dynamic framework that processes (on demand) only those PHP requests it needs to load a page. That’s why it is such a fast page builder. So, considering Divi’s built-in speed and performance optimizations also rely on PHP, it makes the most sense to keep your version of PHP updated.

Why you Should Use the Latest Version of PHP

Because of the important role PHP plays in site performance, it is best practice to use the latest stable version of PHP. The two main reasons to do so are security and speed (but there are other secondary benefits as well).  Each update fixes bugs that, if gone unchecked, could lead to vulnerabilities. And, each new version of PHP increases how many requests it can process per second. This makes your site much faster, without doing any other speed optimizations.

To make sure your site is secure, you will want to run a version of PHP that is actively supported and/or receiving updates. At the time of writing this, the only actively supported versions of PHP are 8.0 and 8.1.  PHP version 7.4 (the version before the major release of 8.0) is only receiving security fixes, but who knows for how long. This means that if you aren’t running at least 7.4 (also a WordPress recommendation), your site may be vulnerable to security threats. And if you are running WooCommerce, the security stakes are even higher which is why WooCommerce strongly recommends running at least 7.4 as well.

For Divi websites, we are aligned with WordPress (and WooCommerce) which is why we also recommend 7.4 or higher. But, to avoid upgrading to a version that is already on its way out (7.4), we recommend upgrading to 8.0 or 8.1 if you can.

For PHP Version, we recommend the following:
PHP Version: 7.4 or higher (8.0+ recommended)

See below for more info on how to update your PHP version.

PHP Runtime Configuration

Now that we understand the importance of running the latest version of PHP, it’s time to go over the PHP directives that can control how PHP runs on your website. Most of the requirements in this list are PHP.ini directives with values that can be adjusted to make sure the webserver is running PHP optimally for your website.

2. memory_limit

The second item from our list is our first PHP directive called memory_limit. This sets the maximum amount of memory a script is allowed to use. By default, memory limits set by your host or by WordPress may be too low. This will lead to applications crashing as PHP reaches the artificial limit. But be careful. Setting the limit too high could lead to bad scripts eating up all available memory.

For this setting, we recommend the following:
memory_limit = 128M

3. post_max_size

The post_max_size PHP directive limits how large a page or file can be on your website. If your page is larger than the limit set in PHP, it will fail to load. Post sizes can become quite large when using the Divi Builder, so it is important to increase this limit. It also affects file size upload/download, which can prevent large layouts from being imported into the builder.

For this setting, we recommend the following:
post_max_size = 64M

4. upload_max_filesize

The upload_max_filesize PHP directive sets the maximum size of an uploaded file. It determines how large a page or file can be on your website. If your page is larger than the limit set in PHP, it will fail to load. Post sizes can become quite large when using the Divi Builder, so it is important to increase this limit. It also affects file size upload/download, which can prevent large layouts from being imported into the builder.

For this setting, we recommend the following:
upload_max_filesize = 64M

5. max_execution_time

The max_execution_time PHP directive affects how long a page is allowed to load before it times out. It is important to set a limit to keep poorly written scripts from tying up the server. But, if the limit is too low, you may not be able to import large layouts and files into the Divi builder. If you run into a problem (especially with uploading large files), you may need to raise this value to meet your needs. However, if you find that you need to increase this value to 300 or more, there may be other underlying issues or a need to upgrade your hosting.

For this setting, we recommend the following:
max_execution_time = 120

6. max_input_time

The max_input_time PHP directive sets the maximum time (in seconds) a script is allowed to parse input data. We want to limit this time to help guard against DOS attacks. But, if the limit is too low, the Divi Builder may time out before it is allowed to load. If you run into a problem, you may need to raise this value to meet your needs. However, if input data is taking more than 60-120 seconds to parse, there may be other underlying issues or a need to upgrade your hosting.

For this setting, we recommend the following:
max_input_time = 60

7. max_input_vars

The max_input_vars PHP directive affects how many input variables may be accepted. It is important that we set a limit in order to guard against DOS attacks. But, if the limit is too low, it may prevent the Divi Builder from loading properly.

For this setting, we recommend the following:
max_input_vars = 1000

8. display_errors

The display_errors PHP directive determines whether or not errors should be printed as part of the page output. This is a feature to help during the development process of a website and should never be used on production sites. It is best to set this to “0” unless you have a specific reason to show these errors during web development.

For this setting, we recommend the following:
display_errors = 0

9. Divi Version

In addition to PHP settings on the server-side, it is always best to use the latest version of Divi. This will help ensure compatibility with WordPress and keep your site fast, more secure, and powerful. If for some reason you have issues with a new version, you can always use our Divi Rollback feature to switch back to previous versions with a single click until the bugs are out. For more, check out how to update the Divi Theme.

We recommend the following:
Divi Version: latest

10. WordPress Version

In addition to Divi, it is always best to use the latest stable version of WordPress. This will not only ensure compatibility with Divi but will also greatly speed up your website, leading to less memory and fewer CPU-related issues. To ensure compatibility with PHP 7.4 (the oldest version currently receiving security updates), you should have WordPress 5.3 or higher. But if you go with our ideal suggestion to upgrade to PHP 8.0+ (or the versions that are actively supported), you should have WordPress 5.6 or higher.

We recommend the following:
WordPress Version: 5.3 or higher

11. Database Version

The database software that your Divi website will use is going to be either MySQL or MariaDB. Either one will work with Divi and WordPress. And, like everything else, we would recommend using the latest version of MySQL or MariaDB for optimal performance.

For Divi, we align with WordPress and recommend the following database versions:
MySQL Version = 5.7 or higher
MariaDB Version = 10.2 or higher

How to Check if your Divi Site Meets the Requirements

divi hosting requirements

Divi System Status Check

Divi has a built-in support feature that performs a system status check for your Divi website. This allows you (and our support team) to identify anything about your site that isn’t meeting our recommendations for Divi.

To check your Divi System Status, go to the WordPress dashboard. Navigate to Divi > Support Center. At the top of the page, you will see the System Status box that lists all the system status check results.

divi hosting requirements

WordPress Site Health

In addition to Divi’s System Status, you can also use WordPress’ built-in site health feature to identify any problems with WordPress. This feature isn’t specific to Divi, but it can be helpful for identifying underlying issues with WordPress. To check on the site health for WordPress, navigate to Tools > Site Health from the dashboard.

divi hosting requirements

How to Make Changes to Your Server Settings

divi hosting requirements

Backup Your Site and Test Updates First

Updating server settings (especially the PHP version) isn’t something you should do without taking certain precautions. For instance, if your site is dependent on a plugin that isn’t compatible with the latest version of PHP (a common problem), your site could break. So it is best practice to make a backup of your site before making any changes. Then make changes on a testing environment or staging site to identify address any issues before taking the new version live. This might seem like a hassle, especially if something breaks. But it is definitely worth the time to make sure your site is fast, secure, healthy going forward.

This is also a good time to update to the latest version of WordPress, Divi, and all your plugins. Chances are that any issues that come up will be a result of bad (or outdated) plugins that don’t work well with newer versions of PHP, WordPress, or Divi.

Updating PHP Version

Each hosting provider should have instructions for changing the PHP version for your site. You should be able to find instructions to update PHP for your hosting provider in this list. If not, you can reach out to them directly. For more, check out these instructions from WordPress.

If you are hosting with one of our Divi Hosting partners, you should already have a stable version of PHP running. But if you want to make sure you are using the latest one, here are a few helpful links.

For Siteground, here’s how to change PHP Version.

For Flywheel, here’s how to request a PHP upgrade.

For Pressable, here’s how to change your PHP version.

For Cloudways, here’s a detailed article about PHP 8 and how to update the PHP version of your WordPress site.

Updating PHP Settings Manually (wp-config.php, .htaccess, or php.ini)

If you want to update PHP settings (the same group of PHP directives in our list above) on your web server, it is best to update these in the php.ini file directly if you can. Another option would be to update the .htaccess file. But, depending on your hosting provider, you may or may not have direct access to the php.ini file or the .htaccess file. So, you may find that it is easier to update the wp-config.php file to make changes to PHP settings.

Here is a brief explanation of how you can update the 3 most common configuration files.

Updating PHP Settings in php.ini

Access your site files (via FTP, file manager, etc.) and make sure you are able to see hidden files. The php.ini file should be located in the public root folder of your site files.

divi hosting requirements

If you are on shared hosting, you probably don’t have access to the main php.ini file. However you may be able to create one. To change or add PHP settings, open the file and use the following format to update each value as needed:

memory_limit = 128M
post_max_size = 64M
upload_max_filesize = 64M
max_execution_time = 120
max_input_time = 60
max_input_vars = 1000
display_errors = 0

NOTE: In some cases, you may also need to define memory_limit in wp-config.php (see below).

Updating PHP Settings Using .htaccess

By default, WordPress uses the .htaccess file to set your site’s permalinks. But, this file also can be used for setting the runtime configuration of PHP on Apache servers. If you have access to this file (via FTP or your hosting provider), it should be located at the root of your site files.

divi hosting requirements

Here you can make the changes you need manually on the WordPress side of things without ever having to contact your host. You can update php.ini values on this file using the following format:

php_value setting_name setting_value

So, if you wanted to update the upload_max_filesize to 64M, it would look like this in the .htaccess file:

php_value upload_max_filesize 64M

Here is a list of our recommended php.ini values in .htaccess file format:

php_value memory_limit  128M
php_value post_max_size  64M
php_value upload_max_filesize  64M
php_value max_execution_time 120
php_value max_input_time 60
php_value max_input_vars 1000

Updating PHP Settings Using wp_config.php

A few of the recommended PHP settings are able to be updated from the wp-config.php file. This file can also be found at the root of your site files.

divi hosting requirements

Here are a few examples of how you can update the wp_config.php file to meet requirements.

To set the memory limit to 128M, you could add the following snippet:

define(‘WP_MEMORY_LIMIT’, ‘128M’);

To set display errors to 0, you could use the following snippet:

@ini_set( ‘display_errors’, 0 );

And to set the max execution time, you could use the following snippet:

set_time_limit(120);

Make sure to include the snippet before the line that reads “That’s All, stop editing!…”

divi hosting requirements

Keep in mind, not all PHP.ini directives can be changed in wp_config.php. Any php.ini directives that do not belong to the PHP_INI_ALL changeable mode, cannot be changed using the ini_set() function. Therefore, the following PHP directives should NOT be changed using ini_set() on the wp-config.php file:

post_max_size
upload_max_filesize
max_input_vars
max_input_time

Instead, you will need to update these settings via .htaccess, php.ini, or by contacting your host.

Contacting Your Host

There is no guarantee the manual options will override the settings of your hosting provider, especially if you are using managed hosting. If you are having trouble making changes manually (or don’t want to do it yourself), you can contact your hosting provider to make the changes for you. Their support should have an email address, phone number, or chat that will allow you to submit the list of requirements you need. If they are unable to fulfill your request, it might be time to upgrade your hosting.

Divi Hosting: Reliable Divi-Optimized Hosting

divi hosting requirements

Keeping your website updated with optimal hosting requirements can be a hassle, especially if your hosting environment isn’t already geared to WordPress or Divi. That is why we offer Divi hosting. We’ve partnered with some of the biggest names in hosting to give you the most reliable, Divi-compatible hosting.

Enjoy perfectly configured hosting environments pre-installed with the tools you need to be successful with Divi.

Check Out Divi Hosting

Divi Speed Optimization

In addition to great hosting that meets Divi’s hosting requirements out of the box, there is always room for better website performance. For more, check out our ultimate guide on Divi Speed Optimization.

What about the Web Server?

There is not one specific web server required to run a WordPress (or Divi).  But the two most predominant web servers for WordPress (and Divi) are Apache and NGINX. For more, check out our post comparing Apache and NGINX.

Final Thoughts

Hopefully, this post gives you what you need to help make sure your Divi Website is set up for success. Here are a few closing takeaways to keep in mind.

  • Use Divi’s system status tool to identify any red flags in regard to your Divi website. This is an easy way to make sure your Divi site meets our recommendations.
  • The importance of running the latest (most stable) version of PHP cannot be overstated. In fact, you can get the best web server (or host) and optimize your site for better speed and performance all you want. But, if you’re running an old (unsupported) version of PHP, your website will suffer. Do what you can to make sure your PHP version is updated ASAP.
  • Before. you make any changes to your server settings or any other updates, back up your site first! Better yet, make changes on a testing or staging site before implementing the changes on the production site.
  • When making changes to server settings, make sure you know why you are doing it. Although it may be an easy fix to increase limits on certain options, you may be inviting more harm. Giving scripts too much time can leave you vulnerable to DOS attacks. Instead, make sure there aren’t any underlying problems first and upgrade your hosting if needed.

I look forward to hearing from you in the comments.

Cheers!



Source link

Poster le commentaire

Votre adresse e-mail ne sera pas publiée.