One place for hosting & domains

      Sites

      Learn to Load Balance Your High Traffic Sites


      How to Join

      This Tech Talk is free and open to everyone. Register below to get a link to join the live stream or receive the video recording after it airs.

      DateTimeRSVP
      December 8, 202111:00 a.m.–12:00 p.m. ET / 4:00–5:00 p.m. GMT

      About the Talk

      Is your app highly available? Do you know what happens to your site when your server goes down? Load balancers are a tool that can provide peace of mind and stability to your infrastructure.

      What You’ll Learn

      • What is a load balancer
      • When to use a load balancer
      • How to utilize DigitalOcean Load Balancers

      This Talk Is Designed For

      • Anyone that wants to create highly available setups
      • Anyone running servers, Kubernetes clusters, or DigitalOcean App Platform apps

      Resources

      DigitalOcean Load Balancers
      DigitalOcean Load Balancers are a fully-managed, highly available network load balancing service. Load balancers distribute traffic to groups of Droplets, which decouples the overall health of a backend service from the health of a single server to ensure that your services stay online.

      Introduction to DigitalOcean Load Balancers



      Source link

      How To Set Up Multiple WordPress Sites Using Multisite [Quickstart]


      Introduction

      WordPress is a robust content management platform, powering over 36% of the web currently. With the multisite feature, WordPress administrators can create multiple sites on one server, using a single WordPress installation, right within their dashboard.

      In this quickstart, learn how to set up multiple instances of WordPress sites that exist on one server or WordPress Droplet using the multisite feature. If you’d prefer a more in-depth walkthrough of a WordPress multisite set up, see How To Set Up WordPress Multisite with Nginx and LEMP on Ubuntu 20.04.

      Prerequisites

      The steps in this tutorial require the user to have sudo privileges. Follow our Initial Server Setup with Ubuntu 20.04 to create an administrative system user with sudo privileges.

      Before working with WordPress, you’ll need to have it installed on your virtual private server. This quickstart uses a Ubuntu 20.04 Droplet with the LAMP stack installed, with a user having root privileges. You can follow this tutorial with other installations, but keep in mind that the steps may vary depending on your installation.

      If you’ve chosen to install WordPress in a similar manner to this tutorial, be sure to stop at the end of step 5 to continue with step 1 of this tutorial.

      Step 1 — Configuring Your WordPress Installation

      With WordPress installed, we need to take a series of steps in a variety of configuration files.

      To begin, let’s modify the WordPress configuration, activating the multisite feature. In your command line after logging into your WordPress server, execute the following command:

      • sudo nano /var/www/html/wp-config.php

      Add the following line above the /* That’s all, stop editing! Happy blogging. */ (or similar text) comment on the wp-config.php file:

      /var/www/html/wp-config.php

      /* Multisite */
      define('WP_ALLOW_MULTISITE', true);
      

      Then, save the file and exit. You can do so by pressing CTRL+S to save, followed by CTRL+X to exit.

      Once done, the WordPress online installation page will be waiting. Access the page by adding /wp-admin/install.php to your site’s domain or IP address (eg. example.com/wp-admin/install.php) and fill out the short online form.

      Step 2 — Setting Up Multiple WordPress Sites

      Go into your WordPress dashboard and select the section called tools:

      networking setup

      Once you have filled out the required fields, go through the directions on the next page:

      next page

      Create a directory for your new sites:

      • sudo mkdir /var/www/wp-content/blogs.dir

      Next, you’ll need to alter your WordPress configuration. Make sure to place the following content above the line saying /* That’s all, stop editing! Happy blogging. */ or similar:

      • sudo nano /var/www/wp-config.php

      /var/www/wp-config.php

      define('MULTISITE', true);
      define('SUBDOMAIN_INSTALL', false);
      $base="/";
      define('DOMAIN_CURRENT_SITE', '<b><i>YOUR IP ADDRESS HERE</b></i>');
      define('PATH_CURRENT_SITE', '/');
      define('SITE_ID_CURRENT_SITE', 1);
      define('BLOG_ID_CURRENT_SITE', 1);
      

      After making all of the necessary changes, log into WordPress once more.

      Step 3 — Setting Up Your New WordPress Site

      After logging into your site again, you will notice that the header bar now has a section called “My Sites” instead of simply displaying your blog’s name:

      header

      You can now create new sites by going to My Sites at the top, clicking on Network Admin, and clicking on Sites:

      create a new site

      Here are a few links to other tutorials that are related to this quickstart guide:



      Source link

      How To Fix the WordPress Memory Exhausted Error by Increasing Your Site’s PHP Memory Limit


      As you may know, WordPress is built using PHP. This programming language is incredibly flexible, but it also has a few drawbacks. For example, if you don’t allocate enough memory for your WordPress installation, you might start running into the occasional “PHP Memory Exhausted” error.

      In a nutshell, this error means your server isn’t allocating enough resources for WordPress to execute the PHP scripts it needs to function properly. This issue can negatively affect your site’s functionality, but there are several ways you can fix and even prevent it.

      In this article, we’ll show you how to fix the memory exhausted problem by increasing your PHP memory limit. However, first, let’s talk about how to recognize this error and what it means!

      Why You’re Seeing a WordPress Memory Limit Error on Your Site

      As we mentioned earlier, the PHP memory limit error means you’re not allocating enough resources for your WordPress installation to function correctly. The problem usually presents itself with a message such as:

      The memory exhausted PHP fatal error.

      Don’t be scared by the word “fatal,” though. Your website isn’t broken, but you will need to make some changes to your WordPress installation if you want it to work properly. Specifically, you’ll want to increase your PHP memory limit.

      By “PHP memory limit,” we mean the amount of server memory that’s allocated to run PHP scripts. By default, that number should be around 64 MB or higher. In most cases, 64 MB is more than enough, however.

      Most hosting servers provide you with far more memory than that, so increasing the PHP allowed memory size shouldn’t negatively impact your website’s performance whatsoever. In fact, unless you’re using a cheap web host or you set up WordPress manually, your PHP memory limit shouldn’t be an issue at all.

      You can easily check to see what your PHP memory limit is by accessing your WordPress dashboard and navigating to Tools > Site Health > Info. Next, you can click on the Server tab and look for the PHP memory limit entry.

      A website with a high PHP memory size.

      Within the Server tab, you can also check other information such as your PHP version and the PHP time limit. The latter variable, which is in seconds, defines how long PHP scripts have to execute before they time out.

      For now, let’s focus on the PHP memory limit. As you can see, the above example has quite a high limit, which means that the website is unlikely to run into a WordPress Memory Exhausted error.

      If your site has a low memory limit (<64 MB), it’s in your best interests to increase it. There are a couple of ways you can do so.

      Take Your WordPress Website to the Next Level

      Whether you need help navigating your web hosting control panel, fixing an error, or finding the right plugin, we can help! Subscribe to our monthly digest so you never miss an article.

      How to Resolve the WordPress Memory Limit Error (2 Methods)

      As far as WordPress errors go, this one has a clear-cut cause and solution. You’re not allocating enough memory for your PHP installation, so you need to increase that number. In this section, we’ll go over two methods you can use: one manual technique and one that requires your wallet.

      1. Increase the PHP Memory Allocated to Your Website Manually

      WordPress enables you to declare your allowed memory size manually by modifying one of two files: .htaccess and wp-config.php. However, changing your WordPress installation’s .htaccess file can lead to site-wide errors since that file governs how it interacts with your server.

      Increasing your PHP memory limit through wp-config.php is, in most cases, the safest option, and it’s remarkably easy to do. All you need is a Secure File Transfer Protocol (SFTP) client such as FileZilla that you can use to connect to your website.

      Once you access your website via SFTP, open the WordPress root folder and look for the wp-config.php file within it.

      A WordPress wp-config.php file.

      Open that file using a text editor, and you should see something like this:

      Editing a wp-config.php file.

      To increase your PHP memory limit, you can simply add a single line of code anywhere after the <?php tag and before the part of the file that reads “/* That’s all, stop editing! Happy blogging. */”.

      This is the line of code to add:

      define( 'WP_MEMORY_LIMIT', 'XXXM' );

      You’ll need to replace the “XXX” variable within that line with the amount of memory you want to allocate to PHP. As we mentioned before, the absolute minimum you should settle for is 64 MB.

      However, you can also double the number to play it safe or increase it even further. For example, if you set a PHP memory limit of 256 MB, it would look like this:

      define( 'WP_MEMORY_LIMIT', ‘256M’);

      Once you’re set on a number, save the changes to wp-config.php and close the editor. Now return to your WordPress dashboard and navigate to Tools > Site Health > Info > Server to see if the changes went through.

      In some cases, declaring your PHP memory limit manually won’t work because you don’t have the necessary permissions to change that value. If you can’t adjust your WordPress memory size manually, that leaves you with one other option.

      2. Upgrade Your Website’s Hosting Plan

      Typically, if you use a decent WordPress hosting provider, you won’t need to worry about increasing your PHP memory limit. One caveat is that if you’re using shared hosting, you’ll likely face limited resources. So if you’re encountering this error, it might be time to upgrade to a better hosting plan.

      Upgrading your hosting package will usually result in an increase in available PHP memory. That means you’re much less likely to run into a WordPress memory limit error. The only limiting factor is your budget.

      If you can’t upgrade hosting plans right now, it might be worth contacting your provider’s support team and seeing if they can increase your PHP memory limit on their end. If they can’t, it might be time to switch to a better WordPress host that offers high PHP memory limits on affordable plans.

      Skip the Stress

      Avoid troubleshooting when you sign up for DreamPress. Our friendly WordPress experts are available 24/7 to help solve website problems — big or small.

      Want More WordPress Error Tips?

      Once you increase PHP memory on your WordPress website, we can help tackle other issues. We’ve put together several tutorials to help you troubleshoot every error message:

      Want more information on WordPress site management? Check out our WordPress Tutorials, a collection of guides designed to help you navigate the WordPress dashboard like an expert.

      Increasing PHP Memory Limit

      Running into a PHP fatal error can be worrying, but it’s not necessarily a cause for concern. Learning how to increase your PHP memory limit is relatively simple if you don’t mind using an SFTP client and adding a single line of code to one of WordPress’ core files.

      The alternative is to upgrade your hosting plan or opt for a better provider. Most WordPress-friendly hosting options offer high limits by default, so you’ll never run into a PHP memory exhausted error ever again.

      If you’re ready to use a web host optimized for WordPress websites, check out our DreamPress hosting packages! We offer optimized WordPress setups, so you spend less time troubleshooting errors and more time working on your website.



      Source link