How to optimize WordPress with Ubuntu VPS

Ubuntu Virtual Private Server optimized for WordPress

Author: .

  • Create sites with Gatsby, Netlify and WordPress

    Algolia search

    Cloudinary image hosting.

    Using WordPress as a Headless CMS

    1. What is a headless (or decoupled) CMS
    2. Why use WordPress as a headless CMS
    3. Tools and process for building a headless site
    4. A basic example and some gotchas we found
    5. The Future is (probably) headless


    How we’re using wordpress as a headless CMS


    Slides from the presentation


    Intro to Building Websites with Gatsby and WordPress (Fast and Static)

    Gatsby an WordPress

    Migrate Your WordPress Site to the JAMstack

    Content writers love the content management workflows that WordPress provides. Devs love the developer experience of using Gatsby. And when you combine the two? Everyone wins!

    Use Gatsby & WordPress for Dynamic Sites

  • Static Site Generators for Cloudflare Workers

    Short answer: Use the free Gatsby and Netifly

    Create your new site with Gatsby and publish the site toNetifly. Finish. Done!

    In 2020 it seems that Gatsby and Netifly are the marketleader like WordPress is to the dynamic market.

    StaticGen A List of Static Site Generators [SSG]for JAMstack Sites

    Which static site generator should you choose There are over 400 SSGs. What follows will help your decision-making process! In the last 2 years, a select number of them reached maturity and dominated the field. They’re the ones you should look at first and the ones highlighted here.

    Choosing a next-generation static site generator

    9 Static Site Generators

    Static sites are a relic of the past originally introduced before CMSs took over the web. Today, they enjoy a successful reincarnation with static-site generators and modern frameworks such as React, Vue and Angular.

    Leveraging the power of modern frameworks with toolings like Webpack and advanced CSS techniques, static site generators (SSGs) let you create and deliver beautiful websites with custom content with very little effort.

    In 2019, there’s a special place to an SSG which works with React, and even leverages components to create a better experience for developers and users.

    So, I’ve gathered some of the finest React static site generators out there to build a beautiful and content-rich website. I hope this list can save you some time, and please feel free to comment, add or suggest your own insights.

    Static Site Generators

    Is static sites make sense for anything beyond a one-pager?

    This site highlights the top open source projects, in many different languages, that make static sites not only viable, but an attractive option for creating sophisticated websites!

    The typical CMS driven website works by building each page on-demand, fetching content from a database and running it through a template engine. This means each page is assembled from templates and content on each request to the server.

    For most sites this is completely unnecessary overhead and only adds complexity, performance problems and security issues. After all, by far the most websites only change when the content authors or their design team makes changes.

    A Static Site Generator takes a different approach and generates all the pages of the website once when there’s actually changes to the site. This means there’s no moving parts in the deployed website. Caching gets much easier, performance goes up and static sites are far more secure.

    JAMstack Sites Fast and secure sites and apps delivered by pre-rendering files and serving them directly from a CDN, removing the requirement to manage or run web servers.

    Headless CMS A List of Content Management Systems for JAMstack Sites

    Jamstack resource

    Static Site Generators

    Free Static Site hosting

    • Netifly
    • Seems to be a market leader.

    • GitHub
    • GitLab
    • BitBucket Pages
    • Amazon AWS S3 free tiere
    • Microsoft Azure free tiere
    • Google GAE forever free
    • Firebase
    • Neocities
    • Surge
    • GitHub Pages
    • ZEIT Now

    Lower priserange Static Site hosting

  • How to use your WordPress domain with Cloudflare Workers

    On the Cloudflare DNS tab change your A-records to a dummy IP.

     

    Use IP: 1.2.3.4

     

    Open the config file
     

    wrangler.toml

     
    and add the line:
     

    [env.production]

     
    Then add the route line:
     

    route = "www.example.com/*"

     
     
    You’d should prefix the domain with www according to this post.

     

     

    Now you are ready to publish the static WordPress site with this command:

     

     

    wrangler publish  --env production

     

     

    References about using a domain with Cloudflare Workers static WordPress

    Publish To Your Domain

     

  • Why you allways should use the prefix www on your WordPress url

    Short version. Never use the root domain with WordPress.
    Always prefix the domain with www or something else.

    References for always prefix WordPress url with www

     
    To www or not to www – Should you use www or not in your domain?
     

  • How to innstall Cloudflare Wrangler, Node.js and npm to publish static WordPress sites

    How to innstall Cloudflare wrangler, npm and Node.js on Mac OSX

    Install Node.js via homebrew

    brew install node
    	

     

     

    Update the shell

    bb ~/.zshrc
      
    bb ~/.bash_profile

     
    Add the following values:

     

    # Node.js and npm
      
    export LDFLAGS="-L/usr/local/opt/icu4c/lib"
      
    export CPPFLAGS="-I/usr/local/opt/icu4c/include"
      
    export PATH="/usr/local/bin:${PATH}"
      
    PATH="/usr/local/bin:${PATH}"
    

     

    Restart Shell

     

    source ~/.zshrc
      
    source ~/.bash_profile

     

     

     

    Verify that Node.js and npm is installed

    • Test Node

      To see if Node is installed, type  

      node -v
      		

        in Terminal. This should print the version number so you’ll see something like this:     v0.10.31 .

    •  

    • Test NPM

      To see if NPM is installed, type  

      npm -v
      		

        in Terminal. This should print the version number so you’ll see something like this     1.4.27

     

    Install wrangler with npm

     

    npm i @cloudflare/wrangler -g
    	

     

    Once you have installed Wrangler, deploy your first Cloudflare Worker.

     

    $ wrangler generate --site my-worker
      
    $ cd my-worker
      
    $ # update your wrangler.toml with your Cloudflare Account ID 
      
    $ wrangler config 
      
    $ wrangler publish
      
    	

     

     

    References for post about Cloudflare Wrangler and Node.js

    Wrangler project page on GitHub

     

    Hosting Static WordPress Sites on Cloudflare Workers

     

    Setting up Node.js and npm on Mac OSX

     

     
     

    Install Node.js and npm using Homebrew on OS X and macOS

  • Get notifications with Slack.com when WordPress goes down.

    Our experience is that e-mail is a huge time-thief. That is why we migrate as many services and functions from e-mail to Slack.com as we can.

    The following four free services supports Slack.com:

    UptimeRobot

    FreshPing

    StatusCacke

    Fake warnings about service down

    CloudFlare.com will give fake warnings unless you whitelist the service in the CloudFlare firewall.

    Lists of IP addresses

    UptimeRobot IP to be whitelisted in CloudFlare.com firewall

    StatusCake

     

    Check some tekst in the robots.txt file

    You can use some text in your robots.txt file for verifying that your site is running.

  • Apply critical Ubuntu kernel patches without rebooting Ubuntu using Canonical Livepatch

    Apply critical Ubuntu kernel patches without rebooting Ubuntu using Canonical Livepatch

    Update Ubuntu kernel without reboot using the free Canonical Livepatch Service. Apply critical Ubuntu kernel patches without rebooting Ubuntu. Apply critical kernel security fixes without rebooting. The Canonical Livepatch Service reduces planned or unplanned downtime while maintaining compliance and security. Livepatch is available on LTS based systems from 14.04 LTS within the normal support cycle.
    (more…)