One place for hosting & domains

      Update

      How to Update Drupal 8 on Ubuntu 18.04


      Updated by Linode

      Written by Linode

      Drupal 8 is the latest version of the popular Drupal content management system. While Drupal 8.1 includes a simple feature for incremental updates, you must preform manual Drupal core updates for any preceding versions. This guide demonstrates how to manually install an incremental Drupal 8 update on your Linode. The examples in this guide assume you have a functional Drupal 8 installation running a LAMP stack on Ubuntu 18.04.

      Note

      If you are not using Ubuntu 18.04, you can find a version of this guide for your Linux distribution in the Drupal section of our documentation site.

      Before You Begin

      1. Complete all the steps in the Install and Configure Drupal 8 on Ubuntu 18.04 guide.

      2. If you followed the Install and Configure Drupal 8 on Ubuntu 18.04 guide, your site’s document root should be in the /var/www/html/example.com/ directory, where example.com is your own site’s domain name. You can list all your directories in /var/www/html to verify the location of your site’s document root.

        ls /var/wwww/html/
        
      3. Update your Ubuntu 18.04 system if you did not complete that step while installing Drupal 8.

        sudo apt-get update && sudo apt-get upgrade
        

        Note

        This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, visit our Users and Groups guide.

        All configuration files should be edited with elevated privileges. Remember to include sudo before running your text editor.

      Create Backups

      In this section, you will create an archive of your Drupal site’s files and store the archive in a backups directory. If needed, you could extract the compressed files in your backup archive to restore the state of your site prior to updating it.

      1. Create a backups directory in your site’s document root to store any backups you make of your Drupal site.

        sudo mkdir /var/www/html/example.com/backups
        
      2. Create an archive of your existing site files and move it into the backups directory. Ensure you replace example.com with your own site’s domain name.

        cd /var/www/html/example.com/public_html
        sudo tar -cvzf example.com-BCKP-$(date +%Y%m%d).tar.gz ./
        sudo mv -v example.com-BCKP-*.tar.gz ../backups
        

        Note

        This process can also be scripted and run on a regular basis using cron.

      Download Updates

      You are now ready to check your Drupal system for available updates. Once you have identified the necessary updates, you will download them as an archive to your Linode.

      1. Log in to your Drupal site and navigate to the Admin Toolbar. Click on Reports and then on Available updates.

        Note

        If Available updates is not listed, enable the Update Manager module by navigating to the Extend menu item in the Admin Toolbar. See Drupal’s documentation for more details on enabling modules.
      2. Right click the link under the RECOMMENDED VERSION heading and copy the link address and paste it somewhere you can access later.

        A Drupal Update

        Note

        If you receive an error when your Drupal 8 installation checks for available updates, it may be having issues communicating with the Drupal website to see if there are updates. You can check your site’s recent log messages, by navigating to Reports and selecting Recent log messages to further investigate the issue.

      3. Connect to your Linode over SSH:

        ssh [email protected]
        
      4. Navigate to your site’s directory. Download the Drupal core archive using wget and pasting the link address you copied from Step 2. Ensure you replace example.com with your own site’s directory name.

        cd /var/www/html/example.com
        sudo wget https://ftp.drupal.org/files/projects/drupal-8.8.2.tar.gz
        

      Upgrade Your Site

      Now that the Drupal core archive is saved to your Linode, you are ready to proceed with the version upgrade of your site.

      Enable Maintenance Mode

      Drupal’s maintenance mode allows users with the right permissions to use your site while everyone else will be presented with a message that the site is under maintenance.

      1. While logged into your Drupal site, navigate to Configuration. Under the Development heading, click on Maintenance mode.

        Maintenance Mode

      2. Check the box next to “Put site into maintenance mode.” Enter a message if desired, and click Save Configuration.

        Turn on Maintenance Mode

      Replace System Files

      1. Toggle back to your terminal window and ensure you are connected to your Linode over SSH.

        ssh [email protected]
        
      2. Navigate to your site’s /var/www/html/example.com/public_html directory and remove existing files and folders except sites and profiles. Ensure you replace example.com with your own site’s directory name.

        cd /var/www/html/example.com/public_html
        sudo rm -ifr autoload.php composer.* example.gitignore index.php LICENSE.txt README.txt robots.txt update.php web.config && sudo rm -ifr core/ modules/ vendor/ themes/
        
      3. Go up one directory to /var/www/html/example.com/ and expand the Drupal core archive that you downloaded in the Download Updates section into your public_html folder. Replace drupal-8.8.2.tar.gz with the name of the archive you downloaded:

        cd ..
        sudo tar -zxvf drupal-8.8.2.tar.gz --strip-components=1 -C public_html
        
      4. From a browser on your local machine, navigate to the following URL on your Drupal site www.example.com/update.php. Ensure you replace example.com with your own site’s domain name. Follow the prompts to continue the update.

        Note

        If update.php does not load or returns a 403 Forbidden error, you may need to update the ownership and permissions of the newly expanded files. For best practices on Drupal site directory and file permissions, see their documentation.
      5. If you are installing additional modules or configuring additional security settings, complete those updates now and continue on to the next step in this section when you are done.

        Note

        The Next Steps section includes a list of Drupal security modules you may consider installing.
      6. Rebuild the site’s cache by navigating to the Admin Toolbar and click on Configuration. Under the Development heading, click on Performance. Finally, click on the Clear all caches button.

      7. Verify your site’s status by viewing its status report. In the Admin Toolbar, click on Reports, then click on Status report.

      8. If the update was successful and your status report does not display any unexpected information, take the site out of maintenance mode by following step 2 in the Enable Maintenance Mode section. Ensure you uncheck the box next to the “Put site into maintenance mode” setting.

      Next Steps

      As a next step, consider installing additional security modules from the Drupal Project Module:

      This guide is published under a CC BY-ND 4.0 license.



      Source link

      How to Update Drupal 8 on Debian 10


      Updated by Linode

      Written by Linode

      Drupal 8 is the latest version of the popular Drupal content management system. While Drupal 8.1 includes a simple feature for incremental updates, you must preform manual Drupal core updates for any preceding versions. This guide demonstrates how to manually install an incremental Drupal 8 update on your Linode. The examples in this guide assume you have a functional Drupal 8 installation running a LAMP stack on Debian 10.

      Before You Begin

      1. Complete all the steps in the Install and Configure Drupal 8 on Debian 10 guide.

      2. If you followed the Install and Configure Drupal 8 on Debian 10 guide, your site’s document root should be in the /var/www/html/example.com/ directory, where example.com is your own site’s domain name. You can list all your directories in /var/www/html to verify the location of your site’s document root.

        ls /var/wwww/html/
        
      3. Update your Debian 10 system if you did not complete that step while installing Drupal 8.

        sudo apt-get update && sudo apt-get upgrade
        

        Note

        This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, visit our Users and Groups guide.

        All configuration files should be edited with elevated privileges. Remember to include sudo before running your text editor.

      Create Backups

      In this section, you will create an archive of your Drupal site’s files and store the archive in a backups directory. If needed, you could extract the compressed files in your backup archive to restore the state of your site prior to updating it.

      1. Create a backups directory in your site’s document root to store any backups you make of your Drupal site.

        sudo mkdir /var/www/html/example.com/backups
        
      2. Create an archive of your existing site files and move it into the backups directory. Ensure you replace example.com with your own site’s domain name.

        cd /var/www/html/example.com/public_html
        sudo tar -cvzf example.com-BCKP-$(date +%Y%m%d).tar.gz ./
        sudo mv -v example.com-BCKP-*.tar.gz ../backups
        

        Note

        This process can also be scripted and run on a regular basis using cron.

      Download Updates

      You are now ready to check your Drupal system for available updates. Once you have identified the necessary updates, you will download them as an archive to your Linode.

      1. Log in to your Drupal site and navigate to the Admin Toolbar. Click on Reports and then on Available updates.

        Note

        If Available updates is not listed, enable the Update Manager module by navigating to the Extend menu item in the Admin Toolbar. See Drupal’s documentation for more details on enabling modules.
      2. Right click the link under the RECOMMENDED VERSION heading and copy the link address and paste it somewhere you can access later.

        A Drupal Update

        Note

        If you receive an error when your Drupal 8 installation checks for available updates, it may be having issues communicating with the Drupal website to see if there are updates. You can check your site’s recent log messages, by navigating to Reports and selecting Recent log messages to further investigate the issue.

      3. Connect to your Linode over SSH:

        ssh [email protected]
        
      4. Navigate to your site’s directory. Download the Drupal core archive using wget and pasting the link address you copied from Step 2. Ensure you replace example.com with your own site’s directory name.

        cd /var/www/html/example.com
        sudo wget https://ftp.drupal.org/files/projects/drupal-8.8.2.tar.gz
        

      Upgrade Your Site

      Now that the Drupal core archive is saved to your Linode, you are ready to proceed with the version upgrade of your site.

      Enable Maintenance Mode

      Drupal’s maintenance mode allows users with the right permissions to use your site while everyone else will be presented with a message that the site is under maintenance.

      1. While logged into your Drupal site, navigate to Configuration. Under the Development heading, click on Maintenance mode.

        Maintenance Mode

      2. Check the box next to “Put site into maintenance mode.” Enter a message if desired, and click Save Configuration.

        Turn on Maintenance Mode

      Replace System Files

      1. Toggle back to your terminal window and ensure you are connected to your Linode over SSH.

        ssh [email protected]
        
      2. Navigate to your site’s /var/www/html/example.com/public_html directory and remove existing files and folders except sites and profiles. Ensure you replace example.com with your own site’s directory name.

        cd /var/www/html/example.com/public_html
        sudo rm -ifr autoload.php composer.* example.gitignore index.php LICENSE.txt README.txt robots.txt update.php web.config && sudo rm -ifr core/ modules/ vendor/ themes/
        
      3. Go up one directory to /var/www/html/example.com/ and expand the Drupal core archive that you downloaded in the Download Updates section into your public_html folder. Replace drupal-8.8.2.tar.gz with the name of the archive you downloaded:

        cd ..
        sudo tar -zxvf drupal-8.8.2.tar.gz --strip-components=1 -C public_html
        
      4. From a browser on your local machine, navigate to the following URL on your Drupal site www.example.com/update.php. Ensure you replace example.com with your own site’s domain name. Follow the prompts to continue the update.

        Note

        If update.php does not load or returns a 403 Forbidden error, you may need to update the ownership and permissions of the newly expanded files. For best practices on Drupal site directory and file permissions, see their documentation.
      5. If you are installing additional modules or configuring additional security settings, complete those updates now and continue on to the next step in this section when you are done.

        Note

        The Next Steps section includes a list of Drupal security modules you may consider installing.
      6. Rebuild the site’s cache by navigating to the Admin Toolbar and click on Configuration. Under the Development heading, click on Performance. Finally, click on the Clear all caches button.

      7. Verify your site’s status by viewing its status report. In the Admin Toolbar, click on Reports, then click on Status report.

      8. If the update was successful and your status report does not display any unexpected information, take the site out of maintenance mode by following step 2 in the Enable Maintenance Mode section. Ensure you uncheck the box next to the “Put site into maintenance mode” setting.

      Next Steps

      As a next step, consider installing additional security modules from the Drupal Project Module:

      This guide is published under a CC BY-ND 4.0 license.



      Source link

      How to Update Your Old WordPress Posts With the Block Editor


      Since the Block Editor is now the default tool for creating new WordPress content, site owners are having to address the question of what will happen to their older posts and pages. This content will inevitably need updating since the Classic Editor plugin won’t be around forever.

      Fortunately, there are methods in place for handling this exact situation. If you need to make changes to an old post, you can easily do so without any help from the Classic Editor. This makes it much easier to bring your old and new content into alignment.

      In this post, we’ll discuss the Block Editor (you might know it by its nickname: Gutenberg) and then we’ll show you two methods for updating your old posts using this new tool. Let’s get started!

      Understanding the Differences Between the Classic and Block Editors

      For many years, WordPress users created new content for their websites in a visual editor, now known as the Classic Editor. It consisted primarily of one large field where you could add text, images, and other media.

      The WordPress Classic Editor.

      The main downside to the Classic Editor was that some elements — such as tables and content columns — required coding or extra plugins to implement. This arguably made the publishing process more complicated and time-consuming than it needed to be.

      To address that issue, the Block Editor was created. It enables you to use a system of ‘blocks’ to create content in WordPress. Each block holds a specific type of content, such as a paragraph, an image, a table, a list, or just about any other element you might want to add to a post or page.

      The WordPress Block Editor.

      With blocks, WordPress users can create more complex content without the need for coding. Each block has individual settings so you can customize specific elements. Additionally, you can more easily move content around the page to create columns or other unique layouts.

      Generally speaking, the Classic Editor is considered the ‘simpler’ of the two options because of its interface. There’s just one field where all of your content goes, as opposed to many separate blocks. However, the Block Editor is built for ease-of-use and can be more user-friendly — especially for those new to WordPress.

      Get More with DreamPress

      DreamPress Plus and Pro users get access to Jetpack Professional (and 200+ premium themes) at no added cost!

      Switching Over from the Classic Editor to the Block Editor

      The Block Editor has been ‘live’ since December 2018 and now serves as the default editor for anyone running WordPress 5.0 or later. However, some users have chosen to disable it in order to continue using the old – or Classic – editor.

      If you’ve been using WordPress for some time and are familiar with the Classic Editor, using the Block Editor may not seem very appealing. After all, it still has compatibility issues with some plugins and themes, and learning a new interface isn’t the most fun way to use your time.

      However, there are a few reasons to embrace the change. To start with, the Block Editor should streamline your content creation. Once you get past the learning curve, adding blocks can be much faster than stopping to code a table or columns by hand. More importantly, you may want to make this transition for the sake of your site in the long term. While right now you can keep the Classic Editor in place using a plugin, WordPress plans to stop support for that system eventually.

      For now, support is promised until 2022. However, once updates are no longer being released, having this plugin installed on your site could pose a security risk. At a certain point, moving over to the Block Editor will be in the best interests of your website.

      What the Block Editor Means for Your Existing Content

      Fortunately, old posts and pages created in the Classic Editor are preserved in their current format with the Block Editor. Each one features a single, large block called a Classic block. All of your text, images, and other content will be found inside this block, unchanged.

      A Classic block in the WordPress Block Editor.

      The Block Editor’s effect on your theme and plugins is a little more complicated. There have been compatibility issues between the new editor and some themes and plugins, so it’s possible that enabling it will cause problems on your site.

      In particular, page builders and other plugins that affect the way the WordPress editor looks and functions tend to have trouble with the Block Editor. However, updates have been released for many of these plugins to fix these issues. It’s a good idea to check each of your major plugins (especially any that affect the editor) to see if they are compatible.

      The Block Editor should be useable with just about any theme. That said, it works better with some than with others. Ideally, you’ll want to use a theme that has been updated for use with the Block Editor or a theme that was created after the new editor’s release and built with compatibility in mind.

      The best way to avoid any potential issues is to create a staging version of your site. Then you can thoroughly test for any problems before updating your live site.

      How to Update Your Old WordPress Posts With the Block Editor (2 Methods)

      Of course, you may not want to leave your old WordPress content as-is. Fortunately, you can update your old posts, pages, and other content types in the Block Editor. There are two primary methods you can use, and each has its pros and cons.

      Before you can use either of them, you’ll need to make sure you have the Block Editor enabled. For most sites, this is already the case.  In other words, if your site is up-to-date and you haven’t done anything to disable the Block Editor, it should be currently active. Therefore, you won’t need to do anything.

      Otherwise, either deactivate the Classic Editor plugin or upgrade to WordPress 5.0 or above to automatically switch your site over to the new editor. Then, you can use one of the following two techniques to work on your existing content.

      Method 1: Continue Editing Your Posts in a Classic Block

      As we described earlier, existing posts and pages will be converted into Classic blocks. If you want, you can edit your content inside these blocks, just as you would in the Classic Editor.

      All you have to do is open the post you wish to update, and click on the Classic block. When you do, you’ll see the TinyMCE toolbar appear at the top of the block. It should look very familiar.

      A Classic block in the Block Editor with the TinyMCE toolbar.

      You can edit within this block exactly as you would in the Classic Editor. If you need to access the Text Editor, you can do so by clicking on the three-dot icon to the right of the toolbar, and selecting Edit as HTML.

      The Edit as HTML option in the Classic block.

      When you select this option, the block’s content will be shown as code, and you can edit it as needed.

      Editing a Classic block in HTML.

      To return to the Visual Editor, simply click on the three-dot icon again and select Edit Visually. That should be all you need to update your old posts using the Classic block.

      Method 2: Convert Your Old Content into Blocks

      The other option you have available is to convert a post or page’s Classic block into new blocks. This will divide up your content up into individual elements, just as if you had created it using the Block Editor.

      To do this, click on the three-dot icon and select Convert to Blocks.

      Selecting the Convert to Blocks option in a Classic block.

      Your post should then split up into separate pieces. Each paragraph will become its own block, as will every heading, image, list, video, button, and element.

      An old Classic Editor post converted into new blocks.

      You can click on an individual block to edit the content within it. While this process usually goes off without a hitch, you’ll want to make sure that each element of your post has converted to the correct type of block.

      For example, if a pull quote from your old post has converted into a regular paragraph block, you can change it by clicking on the leftmost icon in the block toolbar.

      The Change Block Type option in a block.

      You can then select the correct block type from the options listed. Once all of your blocks are set to the correct types, you can use the toolbar at the top of each to make any specific changes related to alignment and placement within the post. You can also make edits related to each block’s type, such as by altering text styling or image size. In other words, you can now use the Block Editor’s full range of capabilities to work on your content.

      New Kid on the Block (Editor)

      Updating old posts is a smart way to freshen up your content and give your site a facelift. If you’re worried about how your old posts will fare in the age of the Block Editor, however, never fear. You can easily make changes to your old posts and pages.

      While you’re updating your WordPress site, why not upgrade your hosting service too? Our DreamPress plans include 24/7 WordPress support to help with all your Block Editor questions.



      Source link