Web Hosting Archives - Website Guides, Tips & Knowledge DreamHost Thu, 06 Jun 2024 20:17:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.4 What Is Docker? Unpacking This Popular Application Platform https://www.dreamhost.com/blog/what-is-docker/ Tue, 02 Apr 2024 14:00:00 +0000 https://dhblog.dream.press/blog/?p=43818 Get to grips with Docker: find out what it is, how it works, and why it's revolutionizing application development and deployment across industries.

The post What Is Docker? Unpacking This Popular Application Platform appeared first on Website Guides, Tips & Knowledge.

]]>
You may often hear developers say “But, it works on my machine!” It’s so common that it’s a meme in the dev world.

This is because as a code becomes more complex, local developer environments drift further away from the server environment setup. Their local machines end up with libraries and programs that may not be available on the servers — leading to code with unfulfilled dependencies on the server.

Finding Neverland meme featuring Johnny Depp and Little Kid Crying "but it works on my machine"

A containerization solution was needed to standardize environments across devices, and et voilà, Docker was born.

Docker changed the way applications are built, shipped, and run. The word “Docker” has become synonymous with efficiency, portability, and scalability.

In this guide, we’ll better understand what Docker is, how it works, and how it could benefit you in your day-to-day development workflows.

Let’s get started, shall we?

What Is Docker?

A "What Is Docker?" diagram set on a cool blue gradient background with clean blue lines showing a container.

At its core, Docker is an open-source platform that enables developers to automate the deployment, scaling, and management of applications using containerization technology. It provides a standardized way to package software along with its dependencies into a single unit called a container.

Containers are lightweight, self-contained environments that contain everything an application needs to run: including the operating system, code, runtime, system tools, libraries, and settings. They provide a consistent and reproducible way to deploy applications across different environments, from development to testing to production.

Containerization

Containerization is a technique that allows applications to be packaged and run in isolated containers. Containerization offers several advantages over traditional deployment methods such as:

  • Consistency: With containers, your applications run consistently across different environments, eliminating compatibility issues and reducing the risk of runtime errors.
  • Efficiency: They’re resource-efficient compared to virtual machines because they share the host system’s kernel and resources, resulting in faster startup times and lower overhead.
  • Scalability: You can easily replicate and scale containers horizontally, allowing applications to handle increased workloads by distributing them across multiple containers.
  • Portability: The application can be moved easily between development, testing, and production environments without requiring modifications.

Docker’s Role In Containerization

"Docker Desktop" in focus with the Containers window open showing the image running.

However, before Docker came into the picture, containerization was complex and required deep technical expertise to implement effectively. Docker introduced a standardized format for packaging applications and their dependencies into portable container images.

Developers can easily define the application’s runtime environment, including the operating system, libraries, and configuration files, using a declarative language called Dockerfile. This Dockerfile is a blueprint for creating Docker images, which are immutable snapshots of the application and its dependencies.

Once a Docker image is created, it can be easily shared and deployed across different environments. Docker provides a centralized online repository called Docker Hub, where developers can store and distribute their container images, fostering collaboration and reusability.

Docker also introduced a command-line interface (CLI) and a set of APIs that simplify the process of building, running, and managing containers. Developers can use simple commands to create containers from images, start and stop containers, and interact with containerized applications.

Key Components Of Docker

"Key Components Of Docker" diagram featuring a Docker file, Docker image, and Docker container.

Now, let’s examine the key components of Docker to better understand the underlying architecture of this containerization technology.

1. Docker Containers

As you’ve probably guessed, containers are at the heart of Docker. Containers created with Docker are lightweight, standalone, and executable packages that include everything needed to run a piece of software. Containers are isolated from each other and the host system, ensuring they don’t interfere with each other’s operations.

Think of containers as individual apartments in a high-rise building. Each apartment has its own space, utilities, and resources, but they all share the same building infrastructure.

2. Docker Images

If containers are apartments, then Docker images are the blueprints. An image is a read-only template that contains a set of instructions for creating a container. It includes the application code, runtime, libraries, environment variables, and configuration files. You can find a lot of pre-built Docker images on the Docker Hub that we previously discussed.

A Docker Hub homepage screenshot in focus with the option to search the platform.

Images are built using a series of layers. Each layer represents a change to the image, such as adding a file or installing a package. When you update an image, only the changed layers need to be rebuilt, making the process efficient and fast.

3. Dockerfiles

Dockerfiles are detailed instructions for creating Docker images.

A Dockerfile is a plain text file that contains a series of instructions on how to build a Docker image. It specifies the base image to start with, the commands to run, the files to copy, and the environment variables to set.

Here’s a simple Dockerfile example:

FROM ubuntu:latest
RUN apt update && apt install -y python
COPY app.py /app/
WORKDIR /app
CMD ["python", "app.py"]

In this example, we start with the latest Ubuntu image, install Python, copy the app.py file into the /app directory, set the working directory to /app, and specify the command to run when the container starts.

What Are The Benefits Of Using Docker?

5 "Benefits Of Using Docker" diagram with icons and text for "Simplified Development," "Improved Efficiency," and so on.

Docker offers numerous benefits that make it a popular choice among developers and organizations:

Simplified Application Development

Development is simple. By packaging applications and their dependencies into containers, Docker allows developers to work on different parts of an application independently. This ensures that everything runs smoothly together. Testing is also simplified, and issues can be caught earlier in the development cycle.

Enhanced Portability

Applications become more portable. Containers can run consistently on different environments, whether on a developer’s local machine, a testing environment, or a production server. This eliminates compatibility issues and makes it easier to deploy applications to different platforms.

Improved Efficiency

Docker improves efficiency. Containers are lightweight and start up quickly, making them more efficient than traditional virtual machines. This means you can get more out of your resources and deploy applications faster.

Better Scalability

Scaling applications is easier with Docker. You can easily run multiple containers across different hosts to handle increased traffic or workload. In this way, scaling applications is much easier.

Streamlined Testing And Deployment

Docker streamlines testing and deployment. Docker images can be easily versioned and tracked, making it easier to manage changes and roll back if needed. Docker also works well with continuous integration and delivery (CI/CD) pipelines, which automate the build and deployment process.

What Are Some Use Cases For Docker?

Docker is widely adopted across various industries and use cases. Let’s explore some common scenarios where Docker shines.

Microservices Architecture

Docker is an excellent fit for building and deploying microservices-based applications. Microservices are small, independently deployable services that work together to form a larger application. Each microservice can be packaged into a separate Docker container, empowering independent development, deployment, and scaling.

For example, an e-commerce application can be broken down into microservices such as a product catalog service, a shopping cart service, an order processing service, and a payment service. Each of these services can be developed and deployed independently using Docker containers, making the overall application much more modular and maintainable.

Continuous Integration And Delivery (CI/CD)

Docker plays an important role in enabling continuous integration and delivery (CI/CD) practices. CI/CD is a software development approach that emphasizes frequent integration, automated testing, and continuous deployment of code changes.

With Docker, you can create a consistent and reproducible environment for building, testing, and deploying applications. You can define the entire application stack, including dependencies and configurations, in a Dockerfile. This Dockerfile can then be version-controlled and used as part of your CI/CD pipeline.

For example, you can set up a Jenkins pipeline that automatically builds a Docker image whenever code changes are pushed to a Git repository. The pipeline can then run automated tests against the Docker container and, if the tests pass, deploy the container to a production environment.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Local Development Environments

Docker is also widely used for creating local development environments. Instead of manually setting up and configuring the development environment on each developer’s machine, you can use Docker to provide a consistent and isolated environment.

Say, you’re developing a web application that requires a specific version of a database and a web server. You can define these dependencies in a Docker Compose file. Developers can then use Docker Compose to spin up the entire development environment with a single command, so everyone has the same setup.

The idea is to eliminate manual setup and configuration, reduce the risk of environment-specific issues, and allow developers to focus on writing code rather than dealing with environment inconsistencies.

Application Modernization

Docker is a valuable tool for modernizing legacy applications. Many organizations have older applications that are difficult to maintain and deploy due to their monolithic architecture and complex dependencies.

With Docker, you can containerize legacy applications and break them down into smaller, more manageable components. You can start by identifying the different services within the monolithic application and packaging them into separate Docker containers. This way, you can gradually modernize the application architecture without a complete rewrite.

Containerizing legacy applications also makes it easier to deploy and scale. Instead of dealing with complex installation procedures and dependency conflicts, you simply deploy the containerized application to any environment that supports Docker.

How To Use Docker

A "How To Use Docker" diagram with 5 steps outlined in a numbered list and Docker's logo on the left.

Now that we know the key components, let’s explore how Docker works:

1. Install Docker

To install Docker, visit the official Docker website and download the appropriate installer for your operating system. Docker provides installers for Windows, macOS, and various Linux distributions.

Once you have downloaded the installer, follow Docker’s installation instructions. The installation process is straightforward and shouldn’t take you very long.

2. Creating and Using Docker Images

Before creating your own Docker image, consider whether a pre-built image already meets your needs. Many common applications and services have official images available on Docker Hub, GitHub Container Registry, or other container registries. Using a pre-built image can save you time and effort.

If you decide to create a custom Docker image, you’ll need a Dockerfile. This file defines the steps to build the image according to your requirements. Here’s how to proceed:

  • Using Pre-Built Images: Search for an existing image on Docker Hub, GitHub Container Registry, or within your organization’s private repository. You can pull an image with the command docker pull <image_name>:<tag>, replacing <image_name> and <tag> with the specific name and version of the desired image.
  • Creating Your Own Image: If a pre-built image doesn’t suit your needs, you can create your own. First, write a Dockerfile based on your requirements. Then, build your image with the following command:
docker build -t my-app .
A "How To Use Docker" diagram with 5 steps outlined in a numbered list and Docker's logo on the left.

This command tells Docker to build an image tagged as my-app using the current directory (.) as the build context. It will then be available in your docker environment to use for container creation.

3. Running A Docker Container

Once you have a Docker image, you can use it to create and run containers. To run a container, use the docker run command followed by the image name and any additional options.

For example, to run a container based on the my-app image we built earlier, you can use the following command:

docker run -p 8080:80 my-app

This command starts a container based on the my-app image and maps port 8080 on the host system to port 80 inside the container.

4. Communicating Between Containers

Containers are isolated by default, but sometimes you need them to communicate with each other. Docker provides networking capabilities that allow containers to communicate securely.

You can create a Docker network using the Docker network create command. Then, connect containers to that network. Containers on the same network can communicate with each other using their container names as hostnames.

For example, let’s say you have two containers: a web application and a database. You can create a network called my-network and connect both containers to it:

docker network create my-network
docker run --name web-app --network my-network my-app
docker run --name database --network my-network my-database

Now, the web app container can communicate with the database container using the hostname database.

5. Basic Docker Commands

Here are some basic Docker commands that you’ll frequently use:

  • docker pull: Pulls the specified Docker image from the Docker Hub
  • docker run: Runs a container based on a specified image
  • docker build: Builds a Docker image from a Dockerfile
  • docker ps: Lists all running containers
  • docker images: Lists all available Docker images
  • docker stop: Stops a running container
  • docker rm: Removes a stopped container
  • docker rmi: Removes a Docker image

These are just a few examples of the many Docker commands available. Refer to the Docker documentation for a comprehensive list of commands and how to use them.

6. Docker Hub

Docker Hub is a public registry hosting a vast collection of images. It serves as a central repository where developers can find and share Docker images.

You can browse the Docker Hub to find pre-built images for various applications, frameworks, and operating systems. These images can be used as a starting point for your applications or as a reference for creating your Dockerfiles.

To use an image from Docker Hub, simply use the docker pull command followed by the image name. For example, to pull the latest official Python image, you can run:

docker pull python:latest
Code featuring the command to pull the latest Python image.

This command downloads the Python image from Docker Hub and makes it available for use on your local system.

7. Mastering Docker Compose: Streamline Your Development

As you continue to explore and integrate Docker into your development workflow, it’s time to introduce a powerful tool in the Docker ecosystem: Docker Compose. Docker Compose simplifies the management of multi-container Docker applications, allowing you to define and run your software stack using a simple YAML file.

What is Docker Compose?

Docker Compose is a tool designed to help developers and system administrators orchestrate multiple Docker containers as a single service. Instead of manually launching each container and setting up networks and volumes via the command line, Docker Compose lets you define your entire stack configurations in a single, easy-to-read file named docker-compose.yml.

Key Benefits of Docker Compose:

  • Simplified Configuration: Define your Docker environment in a YAML file, specifying services, networks, and volumes in a clear and concise manner.
  • Ease of Use: With a single command, you can start, stop, and rebuild services, streamlining your development and deployment processes.
  • Consistency Across Environments: Docker Compose ensures your Docker containers and services run the same way in development, testing, and production environments, reducing surprises during deployments.
  • Development Efficiency: Focus more on building your applications rather than worrying about the underlying infrastructure. Docker Compose manages the orchestration and networking of your containers so you can concentrate on coding.

Using Docker Compose:

  1. Define Your App’s Environment: Create a docker-compose.yml file at the root of your project directory. In this file, you’ll define the services that make up your application, so they can be run together in an isolated environment.
  2. Run Your Services: With the docker-compose up command, Docker Compose will start and run your entire app. If it’s the first time running the command or your Dockerfile has changed, Docker Compose automatically builds your app, pulling the necessary images and creating your defined services.
  3. Scale and Manage: Easily scale your application by running multiple instances of a service. Use Docker Compose commands to manage your application lifecycle, view the status of running services, stream log output, and run one-off commands on your services.

Integrating Docker Compose into your development practices not only optimizes your workflow but also aligns your team’s development environments closely. This alignment is crucial for reducing “it works on my machine” issues and enhancing overall productivity.

Embrace Docker Compose to streamline your Docker workflows and elevate your development practices. With Docker Compose, you’re not just coding; you’re composing the future of your applications with precision and ease.

Dockerize Your Way To Dev Success With DreamCompute

We’ve journeyed through the transformative world of Docker, uncovering how it elegantly solves the infamous “But, it works on my machine!” dilemma and delving into its myriad benefits and applications. Docker’s containerization prowess ensures your projects run seamlessly and consistently across any environment, liberating you from the all-too-common frustrations of environmental discrepancies and dependency dilemmas.

Docker empowers you to transcend the common woes of code behaving unpredictably across different machines. It allows you to dedicate your energy to what you excel at—crafting remarkable code and developing stellar applications.

For both veteran developers and those just embarking on their coding odyssey, Docker represents an indispensable tool in your development toolkit. Think of it as your reliable ally, simplifying your development process and bolstering the resilience of your applications.

As you delve deeper into Docker’s expansive ecosystem and engage with its vibrant community, you’ll discover endless opportunities to harness Docker’s capabilities and refine your development practices.

Why not elevate your Docker experience by hosting your applications on DreamHost’s DreamCompute? DreamCompute offers a flexible, secure, and high-performance environment tailored for running Docker containers. It’s the perfect platform to ensure that your Dockerized applications thrive, backed by robust infrastructure and seamless scalability.

Embark on your Docker adventures with DreamCompute by your side. Build, ship, and run your applications with unparalleled confidence, supported by the comprehensive capabilities of Docker and the solid foundation of DreamCompute.

Ad background image

DreamObjects is an inexpensive object storage service great for hosting files, storing backups, and web app development.

Try It Free for 30 Days

The post What Is Docker? Unpacking This Popular Application Platform appeared first on Website Guides, Tips & Knowledge.

]]>
What Are Environment Variables: A Thorough Guide For Beginners https://www.dreamhost.com/blog/environment-variables/ Fri, 29 Mar 2024 14:00:00 +0000 https://dhblog.dream.press/blog/?p=43774 This beginner-friendly guide breaks down what’s so great about environment variables and how you can use them to your advantage.

The post What Are Environment Variables: A Thorough Guide For Beginners appeared first on Website Guides, Tips & Knowledge.

]]>
Environment variables enable configuring applications without changing code. They detach external data from app logic, which can remain quite mystifying to budding developers (and even some seasoned ones).

Through this hands-on guide, we will lift the veil around environment variables so you can understand what they entail, why they matter, and how to leverage environment variables confidently.

Grab your favorite beverage (and maybe some cookies) cause we’re about to get into it. Let’s unpack environmental variable concepts from the ground up.

What Are Environment Variables?

example of environment variables showing an example of a dynamic value like $SUGAR and what that valuable equals: 1 cup sugar

Environment variables are dynamic named values that can affect how running processes behave on a computer. Some key properties of environment variables are:

  • Named: Have descriptive variable names like APP_MODE and DB_URL.
  • External: Values are set outside the app code via files, command lines, and systems.
  • Dynamic: Can update variables without restarting apps.
  • Configured: Code relies on variables but doesn’t define them.
  • Decoupled: No need to alter code configurations once variables are set.

Here’s an analogy. Imagine you’re following a chocolate chip cookie recipe. The recipe might say:

  • Add 1 cup of sugar
  • Add 1 stick of softened butter
  • Add 2 eggs

Instead of those hard-coded values, you could use environment variables instead:

  • Add $SUGAR cup of sugar
  • Add $BUTTER sticks of softened butter
  • Add $EGGS eggs

Before making the cookies, you’d set those environment variable names to values of your choosing:

SUGAR=1 
BUTTER=1
EGGS=2

So, when following the recipe, your ingredients would resolve to:

  • Add 1 cup of sugar
  • Add 1 stick of softened butter
  • Add 2 eggs

This allows you to configure the cookie recipe without changing the recipe code.

The same concept applies to computing and development. Environment variables allow you to alter the environment in which a process runs without changing the underlying code. Here are a few common examples:

  • Setting the environment to “development” or “production”
  • Configuring API keys for external services
  • Passing in secret keys or credentials
  • Toggling certain features on and off

Environment variables provide great flexibility. You can deploy the same code to multiple environments without changing the code itself. But let’s understand further why they are valuable.

Why Are Environment Variables Valuable?

environment variables are valuable to separate application code from configurations, simplify application configuration, manage secrets and credentials, and promote consistenc

Consider environment variables like application knobs used to dial-in preferences. We will explore excellent use cases shortly.

Let’s solidify intuition on why environment variables matter!

Reason #1: They Separate Application Code From Configurations

reason #1 they separate application code from configurations showing these two elements as separate boxes in the graphic

Hard-coding configurations and credentials directly into your code can cause all sorts of problems:

  • Accidental commits to source control
  • Rebuilding and redeploying code just to change a value
  • Configuration issues when promoting across environments

It also leads to messy code:

import os

# Hard-coded configuration
DB_USER = 'appuser' 
DB_PASS = 'password123'
DB_HOST = 'localhost'
DB_NAME = 'myappdb'

def connect_to_db():
  print(f"Connecting to {DB_USER}:{DB_PASS}@{DB_HOST}/{DB_NAME}")  

connect_to_db()

This entangles business logic with configuration details. Tight coupling makes maintenance arduous over time:

  • Changes require modifying the source code
  • Risk of leaking secrets into source control

Using environment variables reduces these issues. For instance, you can set the DB_USER and DB_NAME environment variables.

# .env file
DB_USER=appuser
DB_PASS=password123  
DB_HOST=localhost
DB_NAME=myappdb

The application code can access the environment variables whenever required, keeping the code clean and simple.

import os

# Load config from environment 
DB_USER = os.environ['DB_USER']
DB_PASS = os.environ['DB_PASS'] 
DB_HOST = os.environ['DB_HOST']
DB_NAME = os.environ['DB_NAME']

def connect_to_db():
  print(f"Connecting to {DB_USER}:{DB_PASS}@{DB_HOST}/{DB_NAME}")
  
connect_to_db()

Environment variables cleanly separate configuration from code, keeping sensitive values abstracted into the environment.

You can deploy the same code from development to production without changing a thing. The environment variables can differ between environments without impacting the code at all.

Reason #2: They Simplify Configuring Applications

Application with three different environment branches: development, staging, production

Environment variables simplify tweaking configurations without touching code:

# .env file:
DEBUG=true

Here’s how we could use it within the script file:

# Script content:
import os

DEBUG = os.environ.get('DEBUG') == 'true' 

if DEBUG:
   print("In DEBUG mode")

Toggling debug mode requires only updating the .env file—no code changes, rebuilding, or redeploying are needed. “Env vars” for short, also help deploy across environments seamlessly:

import os

# Retrieve environment variable to determine the current environment (production or staging)
current_env = os.getenv('APP_ENV', 'staging')  # Default to 'staging' if not set

# Production API key
PROD_API_KEY = os.environ['PROD_API_KEY']

# Staging API key
STG_API_KEY = os.environ['STG_API_KEY']

# Logic that sets api_key based on the current environment
if current_env == 'production':
    api_key = PROD_API_KEY
else:
    api_key = STG_API_KEY

# Initialize API client with the appropriate API key
api = ApiClient(api_key)

The same code can use separate API keys for production vs staging without any changes.

And lastly, they enable feature toggles without new deployments:

NEW_FEATURE = os.environ['NEW_FEATURE'] == 'true'

if NEW_FEATURE:
   enableNewFeature()

Changing the NEW_FEATURE var activates functionality instantly within our code. The interface for updating configurations depends on the systems:

  • Cloud platforms like Heroku use web dashboards
  • Servers use OS command tools
  • Local dev can use .env files

Environment variables are beneficial when creating applications, allowing users to configure elements per their requirements.

Reason #3: They Help Manage Secrets And Credentials

application code branched to environment variables with five branches each labeled secrets

Checking secrets like API keys, passwords, and private keys directly into source code raises substantial security risks:

# Avoid exposing secrets in code!
STRIPE_KEY = 'sk_live_1234abc'
DB_PASSWORD = 'password123'

stripe.api_key = STRIPE_KEY 
db.connect(DB_PASSWORD)

Those credentials are now exposed if this code gets committed into a public GitHub repository!

Environment variables prevent leakage by externalizing secrets:

import os

STRIPE_KEY = os.environ.get('STRIPE_KEY')  
DB_PASS = os.environ.get('DB_PASS')   

stripe.api_key = STRIPE_KEY  
db.connect(DB_PASS)

The actual secret values get set in a local .env File.

# .env file

STRIPE_KEY=sk_live_1234abc
DB_PASS=password123

Don’t forget to .gitignore the .env file to keep secrets out of source control. This involves defining the .env file in a .gitignore file in any repo root, which tells git to ignore the file during commit creation.

This separates secret definitions from application code, loading them securely from protected environments during runtime. The risk of accidentally exposing credentials reduces dramatically.

Reason #4: They Promote Consistency

configuration with four branches shooting off to environment variables

Imagine having different configuration files for development, QA, and production environments:

# Development
DB_HOST = 'localhost'
DB_NAME = 'appdb_dev'

# Production
DB_HOST = 'db.myapp.com'
DB_NAME = 'appdb_prod'

This discrepancy introduces subtle bugs that are hard to catch. Code that works flawlessly in development might suddenly break production due to mismatched configurations.

Environment variables solve this by centralizing configuration in one place:

DB_HOST=db.myapp.com
DB_NAME=appdb_prod

Now, the same variables get used consistently across all environments. You no longer have to worry about random or incorrect settings kicking in.

The application code simply references the variables:

import os

db_host = os.environ['DB_HOST']
db_name = os.environ['DB_NAME']

db.connect(db_host, db_name)

Whether the app runs locally or on a production server, it always uses the correct database host and name.

This uniformity reduces bugs, improves predictability, and makes the app more robust overall. Developers can have confidence that the code will behave identically in every environment.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

How Can You Define Environment Variables

Environment variables can be defined in several places, allowing flexibility in setting and accessing them across processes and systems.

1. Operating System Environment Variables

Most operating systems provide built-in mechanisms for defining global variables. This makes the variables accessible system-wide to all users, applications, etc.

On Linux/Unix systems, variables can be defined in shell startup scripts.

For example, ~/.bashrc can be used to set user-level variables, while /etc/environment is for system-wide variables that all users can access.

Variables can also be set inline before executing commands using the export command or directly through the env command in bash:

# In ~/.bashrc
export DB_URL=localhost
export APP_PORT=3000
# In /etc/environment
DB_HOST=localhost
DB_NAME=mydatabase

Variables can also be set inline before executing commands:

export TOKEN=abcdef
python app.py

Defining variables at the OS level makes them globally available, which is quite helpful when you want to run the app without depending on internal values.

You can also reference defined variables in scripts or command-line arguments.

python app.py --db-name $DB_NAME --db-host $DB_HOST --batch-size $BATCH_SIZE

2. Defining Environment Variables In Application Code

In addition to OS-level variables, environment variables can be defined and accessed directly within the application code while running.

The os.environ dictionary in Python contains all currently defined environment variables. We can set new ones by simply adding key-value pairs:

Environment variables can also be defined and accessed directly within the application code. In Python, the os.environ dictionary contains all defined environment variables:

import os
os.environ["API_KEY"] = "123456" 
api_key = os.environ.get("API_KEY")

So, the os.environ dictionary allows for the dynamic setting and retrieving of environment variables from within Python code.

Most languages come bundled with their libraries, offering access to environment variables during runtime.

You can also use frameworks like Express, Django, and Laravel to have deeper integrations, such as auto-loading .env files containing environment variables.

3. Creating Local Configuration Files For Environment Variables

In addition to system-level variables, environment variables can be loaded from an application’s local configuration files. This keeps configuration details separate from code, even for local development and testing.

Some popular approaches:

.env Files

The .env file format convention popularized by Node.js provides a convenient way to specify environment variables in a key-value format:

# .env
DB_URL=localhost
API_KEY=123456

Web frameworks like Django and Laravel automatically load variables defined in .env files into the application environment. For other languages like Python, libraries such as python-dotenv handle importing .env files:

from dotenv import load_dotenv
load_dotenv() # Loads .env variables

print(os.environ['DB_URL']) # localhost

The benefit of using .env files is they keep configuration clean and separate without making changes to code.

JSON Configuration Files

For more complex configuration needs involving multiple environment variables, using JSON or YAML files helps organize variables together:

// config.json
{
  "api_url": "https://api.example.com",
  "api_key": "123456", 
  "port": 3000
}

Application code can then quickly load this JSON data as a dictionary to access configured variables:

import json

config = json.load('config.json')  

api_url = config['api_url']
api_key = config['api_key'] 
port = config['port'] # 3000

This prevents messy dotenv files when dealing with multiple app configurations.

How Do You Access Environment Variables In Different Programming Languages?

However we choose to define environment variables, our applications need a consistent way of looking up values during runtime.

While various ways exist to define environment variables, application code needs a standard way to access them at runtime, regardless of language. Here is an overview of techniques to access env variables across popular languages:

Python

Python provides the os.environ dictionary to access defined environment variables:

import os

db = os.environ.get('DB_NAME')

print(db)

We can get a variable using os.environ.get(), which returns None if undefined. Or access directly via os.environ(), which will raise KeyError if it is not present.

Additional methods like os.getenv() and os.environ.get() allow specifying default values if unset.

JavaScript (Node.js)

In Node.js JavaScript code, environment variables are available on the global process.env object:

// Get env var
const db = process.env.DB_NAME;

console.log(db);

If undefined, process.env will contain undefined. We can also supply defaults like:

const db = process.env.DB_NAME || 'defaultdb';

Ruby

Ruby applications access environment variables through the ENV hash:

# Access variable 
db = ENV['DB_NAME']  

puts db

We can also pass a default value if the desired key does not exist:

db = ENV.fetch('DB_NAME', 'defaultdb')

PHP

PHP provides global methods getenv(), $_ENV and $_SERVER to access environment variables:

// Get env var
$db_name = getenv('DB_NAME');

// Or access $_ENV or $_SERVER arrays 
$db_name = $_ENV['DB_NAME'];

Depending on the variable source, they may be available in different globals.

Java

In Java, the System.getenv() method returns env variables which can be accessed:

String dbName = System.getenv("DB_NAME");

This allows access to variables defined at a system level globally in Java.

For now, some best practices around environment variable hygiene.

Environment Variable Security Guide

never store sensitive info, use environment-specific variables, keep secrets of out version control, secure secrets on production servers, use strong encryption algorithms, rotate secrets regularly

When it comes to managing environment variables securely, we should keep several best practices in mind.

Never Store Sensitive Information In Code

First and foremost, never store sensitive information like passwords, API keys, or tokens directly in your code.

It may be tempting to just hardcode a database password or an encryption key into your source code for quick access, but resist that urge!

If you accidentally commit that code to a public repository on GitHub, you’re essentially broadcasting your secrets to the entire world. Imagine if a hacker got ahold of your production database credentials just because they were sitting in plain text in your codebase. Scary thought, right?

Instead, always use environment variables to store any sort of sensitive configuration. Keep your secrets in a secure place like a .env file or a secrets management tool, and reference them in your code via environment variables. For example, instead of doing something like this in your Python code:

db_password = "supers3cr3tpassw0rd"

You’d store that password in an environment variable like this:

# .env file
DB_PASSWORD=supers3cr3tpassw0rd

And then access it in your code like:

import os
db_password = os.environ.get('DB_PASSWORD')

This way, your secrets are still safe even if your source code gets compromised. Environment variables act as a secure abstraction layer.

Use Environment-Specific Variables

Another practice is using different environment variables for each application environment, such as development, staging, and production.

You don’t want to accidentally connect to your production database while developing locally just because you forgot to update a config variable! Namespace your environment variables for each environment:

# Dev
DEV_API_KEY=abc123
DEV_DB_URL=localhost

# Production
PROD_API_KEY=xyz789
PROD_DB_URL=proddb.amazonaws.com

Then, reference the appropriate variables in your code depending on the current environment. Many frameworks like Rails provide environment-specific config files for this purpose.

Keep Secrets Out Of Version Control

It’s also crucial to keep your .env and config files containing secrets out of version control. Add .env to your .gitignore so you don’t accidentally commit it to your repository.

You can use git-secrets to scan for sensitive info before each commit. For extra security, encrypt your secrets file before storing it. Tools like Ansible Vault and BlackBox can help with this.

Secure Secrets On Production Servers

When managing environment variables on your production servers, avoid setting them using command line arguments, which can be inspected through the process table.

Instead, use your operating system or container orchestration platform’s environment management tools. For example, you can use Kubernetes Secrets to store and expose secrets securely to your application pods.

Use Strong Encryption Algorithms

Use robust and modern encryption algorithms when encrypting your secrets, whether in transit or at rest. Avoid deprecated algorithms like DES or MD5, which have known vulnerabilities. Instead, opt for industry-standard algorithms like AES-256 for symmetric encryption and RSA-2048 or ECDSA for asymmetric encryption.

Rotate Secrets Regularly

Rotate your secrets regularly, especially if you suspect they may have been compromised. Treat secrets like you would a password — update them every few months. A secrets management tool like Hashicorp Vault or AWS Secrets Manager can help automate this process.

Be Careful With Logging And Error Reporting

Be careful about logging and error reporting. Make sure not to log any environment variables that contain sensitive values. If you’re using a third-party error tracking tool, configure it to sanitize sensitive data. The last thing you want is for your secrets to appear in a stack trace on an exception reporting dashboard!

When To Avoid Environment Variables?

environment variable with 4 branch offs, but each with an ex blocking the way to complex configuration, sensitive information, multiple environments, team sharing

There are several cases where environment variables should be avoided:

Managing Complex Configuration

Using environment variables to manage configuration for complex software systems can become messy and error-prone. As the number of configuration parameters grows, you end up with long environment variable names that can unintentionally collide. There is also no easy way to organize related configuration values together.

Instead of environment variables, consider using configuration files in a format like JSON or YAML. These allow you to:

  • Group related configuration parameters together in a nested structure.
  • Avoid naming collisions by encapsulating config in scopes and namespaces.
  • Define custom data types instead of just strings.
  • Quickly view and modify configurations using a text editor.

Storing Sensitive Information

While environment variables seem easy to inject external configurations like API keys, database passwords, etc., this can cause security issues.

The problem is environment variables are accessible globally in a process. So, if an exploit exists in part of your application, it could compromise secrets stored in environment variables.

A more secure approach is using a secret management service that handles encryption and access control. These services allow storing of sensitive data externally and provide SDKs for retrieving application values.

So, consider using a dedicated secrets management solution rather than environment variables for credentials and private keys. This reduces the risk of accidentally exposing sensitive data through exploits or unintended logging.

Working With Multiple Environments

Managing environment variables can become tedious as applications grow and get deployed across multiple environments (dev, staging, staging, prod). You may have fragmented configuration data spread across various bash scripts, deployment tools, etc.

A configuration management solution helps consolidate all environment-specific settings into a centralized place. This could be files in a repository, a dedicated configuration server, or integrated with your CI/CD pipelines.

If the goal is to avoid duplicating environment variables, a single source of truth for configurations makes more sense.

Sharing Configuration Across Teams

Since environment variables are sourced locally per process, sharing and synchronizing configuration data across different teams working on the same application or suite of services becomes very difficult.

Each team may maintain its copy of configuration values in different bash scripts, deployment manifests, etc. This decentralized configuration leads to the following:

  1. Configuration drift: With no single source of truth, it’s easy for configuration to become inconsistent across environments as different teams make independent changes.
  2. Lack of visibility: There is no centralized way to view, search, and analyze the entire configuration state across all services. This makes it extremely difficult to understand how a service is configured.
  3. Auditing challenges: Changes to environment variables are not tracked in any standard way, making it hard to audit who changed what configuration and when.
  4. Testing difficulties: With no way to easily snapshot and share configuration, ensuring consistent environments for development and testing becomes extremely cumbersome.

Rather than this fragmented approach, having a centralized configuration solution allows teams to manage configuration from a single platform or repository.

Build Your Apps With Environment Variables For The Long-Term

As your application grows, consider how you may need more advanced ways to manage its configuration settings.

What seems straightforward now could get more complicated later on. You’ll likely need better ways to control access, share team settings, organize everything clearly, and update configurations smoothly.

Don’t back yourself into a corner by just using environment variables from the start. You want to plan how to handle configurations as your needs expand.

While environment variables are great for handling environment-focused data like login credentials, database names, local IPs, etc, you want to create a system that follows sound principles like security, shareability, organization, and the ability to adapt to changes quickly.

The alternatives we discussed, like using a dedicated configuration file or service, have valuable features that align with those principles. That will help you to keep moving quickly without getting slowed down.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

The post What Are Environment Variables: A Thorough Guide For Beginners appeared first on Website Guides, Tips & Knowledge.

]]>
How To Fix The ERR_SSL_PROTOCOL_ERROR (8 Ways) https://www.dreamhost.com/blog/fix-err-ssl-protocol-error/ Fri, 23 Feb 2024 10:00:23 +0000 https://dhblog.dream.press/blog/?p=36170 You visit your favorite site and receive a warning about an invalid certificate or ERR_SSL_PROTOCOL_ERROR. Suddenly, you can’t visit the site, and the information you want is no longer accessible. This common error is related to issues establishing an encrypted SSL/TLS connection with the website’s server. Without that secure handshake, browsers block access to protect […]

The post How To Fix The ERR_SSL_PROTOCOL_ERROR (8 Ways) appeared first on Website Guides, Tips & Knowledge.

]]>
You visit your favorite site and receive a warning about an invalid certificate or ERR_SSL_PROTOCOL_ERROR. Suddenly, you can’t visit the site, and the information you want is no longer accessible.

This common error is related to issues establishing an encrypted SSL/TLS connection with the website’s server. Without that secure handshake, browsers block access to protect your data.

The good news is that, although perplexing, you can often resolve the ERR_SSL_PROTOCOL_ERROR with a few simple fixes. In this guide, we’ll uncover what causes it and walk through various solutions to have you browsing securely again.

What Is The ERR_SSL_PROTOCOL_ERROR?

To understand ERR_SSL_PROTOCOL_ERROR, we first need to explore how website connections happen under the hood…

When you enter a URL into a web browser, a request fires off to connect with a server to retrieve the associated resource. If it’s an e-commerce site, you want assurance that personal details like payment data remain safe and that no sneaky eyes snoop along the purchasing journey.

Modern sites use encryption called TLS (Transport Layer Security), which is based on an older protocol called SSL (Secure Sockets Layer). SSL/TLS provides an encrypted secure connection that secures data in transit between your browser and the web server hosting the site.

DreamHost Glossary

SSL/TLS

SSL stands for secure sockets layer. SSL is a protocol for maintaining a secure connection and protecting sensitive data to keep internet users safe during online transactions, login sequences, and more. Transport layer security (TLS) is the successor to SSL that’s in place today and handles vulnerabilities even more effectively.

Read More

It protects information like logins, browsing activity, communications, and transactions by scrambling it into coded gibberish only reconstituted at the final destination points.

But an encrypted connection doesn’t just happen automatically (that’s a little programmer joke!). The browser and server undergo a meticulous multi-step process termed a “handshake” to safely establish and validate the encrypted pathway, securely linking them.

Here’s a quick rundown of the steps that take place in the background during an SSL handshake:

the SSL handshake starts flows from hello to agreement to verification to key swap to secure connection log in to data transfer
  • Hello: The client says “Hi” to the server and shares options for connecting securely.
  • Agreement: The server responds with its identity certificate and agrees on the best encryption method.
  • Verification: The client verifies the server’s identity is authentic.
  • Key swap: The client and server exchange special keys to encrypt data.
  • Secure connection locked in: Both sides confirm everything is good to go and create a secure connection.
  • Data transfer: The browser and website can now share private information encrypted through the secure tunnel.

The main goal is to share an identity safely, validate both parties, and trade secret keys to encrypt data between the client browser and server website.

If anything disrupts the TLS handshake, it fails. Websites don’t load properly, and the browser warnings tell you there was a connection error.

That failed handshake typically triggers the infamous “ERR_SSL_PROTOCOL_ERROR” message. It signifies the browser and server couldn’t agree on encryption versions, keys, certificates, or other required components to complete the security tunnel setup.

Now that you understand what’s supposed to happen, let’s explore what can cause things to break, resulting in ERR_SSL_PROTOCOL_ERROR frustration.

What Triggers The ERR_SSL_PROTOCOL_ERROR?

SSL/TLS are encryption protocols that establish an encrypted link between a browser and a server. They protect sensitive data such as passwords, emails, downloads, and more during their transfer from you to the website.

To create this encrypted connection, the browser and server must handshake using compatible SSL/TLS versions, supported ciphers, and valid certificates. If anything interferes with that authentication process, the handshake fails – triggering browser warnings about connection issues or the dreaded ERR_SSL_PROTOCOL_ERROR.

reasons for SSL errors include outdated browser, server config errors, SSL config errors, invalid certiciate, date & time issues, browser cache issues, and software interruptions

Potential culprits behind a failed SSL/TLS handshake include:

  • An outdated browser is unable to support modern protocols.
  • The server does not support the required encryption ciphers.
  • There are errors in the SSL/TLS configuration on the server.
  • The website has an expired or invalid SSL certificate.
  • Incorrect date and time settings are on your device.
  • Caching issues are corrupting SSL data.
  • Problems arise with antivirus software, firewalls, proxy settings, and more.

Pinpointing what disrupted the handshake is a great start to correcting ERR_SSL_PROTOCOL_ERROR across your browsers and devices.

8 Ways To Fix ERR_SSL_PROTOCOL_ERROR

With so many potential sources of the issue, you need to methodically check common issues until you uncover the SSL/TLS troublemaker. Let’s explore critical techniques to squash ERR_SSL_PROTOCOL_ERROR in your browser:

1. Set The Correct Date & Time

The easiest first step is to verify you’ve set your computer’s date and time correctly. If inaccurate, this can hinder SSL certificate expiration checks and other processes that depend on coordinated universal times.

To quickly fix this:

screenshot of the date & time setting menu on a mac showing the toggle option to auto set date and time
  • Go to Windows Date & Time settings or Mac system preferences.
  • Enable the “Set date and time automatically” toggle if available.
  • Select your time zone.
  • Ensure the date and time match the current settings online.

Once you’ve confirmed everything is correct, reload the site to see if this resolved your ERR_SSL_PROTOCOL_ERROR message.

2. Clear Browser Cache & Cookies

Outdated SSL data in your browser cache or cookies can disrupt that critical SSL/TLS handshake. Often, clearing this data resolves common SSL errors like the one we’re currently tackling.

To flush cache/cookies in popular browsers:

screenshot of the "Clear browsing data" setting in chrome pointing out the time range with "all time" selected from the drop-down
  • Chrome: Click the menu button > Clear browsing data
  • Firefox: Click the menu button > Options > Privacy & Security > Clear Data
  • Safari: Develop menu > Empty Caches
  • Edge: Click menu > Settings > Clear Browsing Data

Select all time ranges and check cached images/files and cookies before confirming the clearing. Afterward, reload pages initially affected by ERR_SSL_PROTOCOL_ERROR to test whether this solved the SSL issue.

3. Update Your Web Browser

Another browser-based culprit is running outdated software that cannot connect using modern TLS 1.2 or 1.3 protocols many sites now require. Each version bump brings improved encryption strength that websites use to protect internet users’ data in transit.

However, old browsers still operate on deprecated protocols like TLS 1.0 without support for current ciphers able to handshake new server configurations. To fix this, simply update the browser to the latest version.

Here’s how to update common browsers:

about Chrome settings box showing the relaunch button to the right of "nearly up to date! relaunch chrome to finish updating"
  • Chrome: Click menu > Help > About Google Chrome. Chrome auto-updates but checks and triggers manual updates if available.
  • Firefox: Click menu > Help > About Firefox. Initiates auto-check and manual updates.
  • Safari: Apple menu > Software Update. or the Updates tab in the App Store app to check for Apple software updates, including Safari.
  • Edge: Click menu > Help and feedback > About Microsoft Edge to auto-update Windows. You can also manually update if desired.

Install any pending browser updates. Once done, give sites with prior ERR_SSL_PROTOCOL_ERROR another whirl to see if the update did the trick.

4. Adjust Firewall And Antivirus Settings

Security software like your antivirus program, VPNs, and firewalls play an important role in protecting devices and connections from online threats.

However, they occasionally overreach — misinterpreting legitimate connections to websites as potential risks.

This interception blocks what appears suspicious, making the website connections fail and triggering the common ERR_SSL_PROTOCOL_ERROR. Luckily, this is easy to fix by adding website exceptions to security tools:

allowed apps setting box showing "ncat" highlighted and checkmark toggles checked for private and public
  • Windows Firewall: Permit apps network access under Allow an App Through Windows Defender Firewall.
  • Avast: Open the application > whitelist web addresses causing issues on the Exclusions list.
  • AVG: Add problematic websites to exclusions under Options > Advanced Settings.

For a diagnostic step, try temporarily disabling your antivirus software to see if it resolves the issue. Similarly, turning off your firewall momentarily can help determine if it is responsible for your SSL connection errors – Just make sure to turn it back on!

Once you’re sure these tools are causing the errors, simply add exceptions, and you’re ready to keep moving.

5. Check SSL Certificate Issues

Shifting gears into issues outside direct control, server-side website infrastructure also plays a key role in completing the TLS handshake with browsers.

An SSL-protected website securely validates identity and enables encryption. You can check if your connection to a website is secure by clicking on the padlock icon on the left of the URL in your address bar.

Nerd Note: The padlock icon has now changed to a “configuration” icon for the Chrome browser.

However, expired or improperly set up certificates can block establishing secure browser connections, triggering the ERR_SSL_PROTOCOL_ERROR warning.

close up of a chrome address bar shwoing the site information button engaged and options for connection is secure and cookies and site data and well as site settings

While mostly website owner terrain, you can absolutely check to be sure it’s a server-side issue:

  • Confirm no warnings appear mentioning certificate problems, mismatches, or expirations.
  • Use the Qualys SSL Checker Tools to inspect certificates.
screenshot of the SSL server test by Qualys

If you find SSL certificate problems, you can contact the site owners by looking for email addresses on their websites. With proper information, owners can quickly investigate and deploy an updated certificate.

6. Reset Browser Settings

Despite trying typical browser fixes, if ERR_SSL_PROTOCOL_ERROR still dashed site loading hopes, consider browser settings resets:

reset settings dialogue box on Chrome
  • Chrome Desktop: Click menu > Settings > Reset settings.
  • Firefox: Click menu > Help > Troubleshooting Info > Refresh / Reset Firefox

Resetting erases ALL browser data and custom settings. So, use this as a last-resort troubleshooting step. If some custom settings in the browser were causing the issue, resetting will remove whatever factor was standing between you and the websites working correctly again.

A word of caution — Don’t reset browser settings on a whim, as the deletion is aggressive. Try safer options first before going this route!

7. Disable Browser Extensions

Some third-party browser extensions interfere with websites loading properly or establishing secure SSL/TLS connections.

Try disabling unnecessary extensions one by one and reloading impacted sites to check if an extension causes issues:

close up of a chrome extensions icon to the right of the address bar
  • Chrome: Puzzle icon > Manage extensions > Toggle off.
screenshot of two extensions in extension management menu noting the toggle in the lower right-hand corner of each box
  • Firefox: Menu > Add-ons > Extensions > Disable individually
  • Safari: Safari menu > Preferences > Extensions > Uncheck boxes

If disabling a particular extension allows sites to load correctly, update the extension if possible or check settings closely related to privacy, security, or SSL handling.

However, you may need to permanently remove an extension if problems persist.

8. Use A VPN Service

Particularly when other troubleshooting struck out, routing web traffic through an encrypted VPN tunnel sometimes resolves stubborn ERR_SSL_PROTOCOL_ERROR messages.

A VPN extends an encrypted tunnel from your device to the VPN server itself first before then reaching out to external websites.

VPNs at a glance showing the VPB as a comms point between the client and the server

This allows sites to complete the SSL/TLS handshake through the VPN tunnel rather than dealing directly with a browser that struggles to make local encrypted connections.

To set up a VPN:

  • Pick a good VPN provider and download the software.
  • Install on the device, create an account, and connect to the local server.
  • Refresh problematic sites with an active VPN.

If pages load correctly, something related to your specific network is likely blocking successful SSL handshakes natively. Corporate firewalls and proxies potentially interfere with work devices, for example. Other geographic restrictions can also bubble up depending on where you physically reside when attempting to access certain websites.

While VPNs provide temporary relief, they do degrade browsing performance. Plus, costs add up for paid services in the long term. So, determine if any restrictive policies or configurations unique to your situation block SSL traffic, which the VPN successfully sidesteps. At the end of the day, you want to address the root cause first, even if you choose to resort permanently to using a VPN.

FAQs

What is the solution for ERR_SSL_PROTOCOL_ERROR?

The solution is identifying what blocked the SSL/TLS handshake and then applying the right fix whether updating old browsers, clearing corrupt cache data, checking server configurations, or rectifying certificate issues. You need to go one step at a time; verifying common causes of the  ERR_SSL_PROTOCOL_ERROR and working on fixing them.

What is ERR_SSL_PROTOCOL_ERROR on my website?

It likely means the web server is misconfigured and fails to establish SSL connections with visiting browsers, preventing SSL handshakes from completing properly. Site owners should examine supported TLS and cipher versions, validate the certificate deployed, and confirm no blocking firewall rules exist on the server.

How do I check my SSL settings in Chrome?

Use chrome://settings/security in the URL bar. It displays certificate authorities stored, HTTPS/SSL version support capability, management of certificates, and options to clear SSL state like session data and hostname resolutions. Review settings against supported configurations by the website for troubleshooting odd SSL behavior in Chrome.

Prevent Future ERR_SSL_PROTOCOL_ERROR Woes

TLS handshakes are critical for establishing secure encrypted website connections. But they can fail in many ways: outdated software, misconfigurations, certificate issues, and more triggering cryptographic errors that block access.

As a site owner, it can feel overwhelming to stay on top of encryption protocols apart from your other priorities. But your visitors need assurance their data gets protected during website transactions.

That’s where choosing a managed hosting provider like DreamHost shines. The security experts here handle the heavy lifting in terms of security management:

  • Automatically apply the latest TLS patches
  • Monitor expiring SSL certificates 24/7
  • Ensure compatible ciphers and protocols
  • Provide free shared certificates
  • Upgrade plans include dedicated IP addresses
  • Save hours not having to troubleshoot cryptographic issues!

DreamHost provides robust security while abstracting away the complexities website owners traditionally shoulder alone. One less headache while keeping sites safe and performing fast.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

The post How To Fix The ERR_SSL_PROTOCOL_ERROR (8 Ways) appeared first on Website Guides, Tips & Knowledge.

]]>
Email Authentication: How To Avoid The Spam Folder https://www.dreamhost.com/blog/email-authentication/ Thu, 11 Jan 2024 15:00:41 +0000 https://dhblog.dream.press/blog/?p=42858 A survey of email marketing strategies around the world found that for every dollar spent, the average American business made $36. In the EU and UK combined, the return on investment (ROI) is more like $41 for every dollar — possibly due to solid privacy regulations that help prevent spam. So it’s no surprise the […]

The post Email Authentication: How To Avoid The Spam Folder appeared first on Website Guides, Tips & Knowledge.

]]>
A survey of email marketing strategies around the world found that for every dollar spent, the average American business made $36. In the EU and UK combined, the return on investment (ROI) is more like $41 for every dollar — possibly due to solid privacy regulations that help prevent spam.

So it’s no surprise the same study found that a massive 87% of brands call email “very critical” to the success of their overall business.

If you haven’t yet delved into the world of email to attract and retain a solid customer base, stop here and go read our very comprehensive email marketing guide first.

When you’re ready to refine your email marketing program and further increase ROI, we’ll show you how in this guide to setting up email authentication to improve deliverability and protect your customers. 

What Is Email Authentication?

First, a little clarification before we begin. Inbox service providers (ISPs) including Gmail, Yahoo, etc. are sometimes lumped in with email service providers (ESPs) like Mailchimp. However, we think it’s important to differentiate between free ISPs that are meant for personal use and paid ESPs that focus on email marketing.

Alright, now let’s dive in.

Email authentication, or email validation, is a process ESPs put into place to filter out as much spam, phishing, scamming, spoofing, and other malicious action as possible before it hits inboxes.

The steps involved in editing your domain name system (DNS) settings to enable the three most widely-embraced email authentication methods on your website — SPF, DKIM, and DMARC — put security processes in place to confirm the source and legitimacy of an email sender and message.

DreamHost Glossary

DNS

The Domain Name System (DNS) protocol keeps records of which domain names correspond to specific IP addresses. DNS enables you to browse the web by typing in regular URLs instead of IP addresses.

Read More

Today, all legitimate ISPs and most ESPs look for as many of the above protocols as possible attached to email messages before they deliver them. If you don’t put them in place correctly, it raises red flags that you may not be a trustworthy sender. That can cause your messages to be relegated to the spam folder, or never even delivered at all.

Seem like overkill?

That’s easy to think when you’re not aware of how much spam email is flying around the internet every day — which is precisely because email authentication is working as intended.

circle graph comparing how much spam email (45%) to legit email (55%) from a December 2022 study

Do I Need Authentication If I Use An Email Marketing Platform?

Let’s get this out of the way at the top. Simply, yes, you should still set up email authentication via your website even when using a trusted ESP, aka email marketing platform.

With Mailchimp for example — we keep going back to them because they’re well known and have lots of helpful documentation on this matter — users with domains that are not hosted by Mailchimp are encouraged to set up their own email authentication. This is because Mailchimp enables authenticated email on their hosted domains by default, as do many domain hosting solutions, including DreamHost (DreamHost email actually works with any domain you own!).

This is probably the time to note that you should check with your domain host on whether or not email authentication is already set up on your website. We should also make it clear that you can only secure email authentication on domains you own — there’s no authenticating Gmail, Yahoo, and other ISP addresses. Being able to authenticate your emails is just one several reasons why we’re proponents of small businesses having custom email addresses.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Why You Should Authenticate Emails (One Word: Spam!)

As we touched on above, there’s a lot of spam being sent every day.

And not just that, there are even more malicious messages looking to worm their way into your inbox.

Gmail alone blocks over 100 million phishing attempts daily.

Phishing is a deception strategy where the sender pretends to be a reputable person or brand in order to get sensitive information out of the recipient, such as credit card details, social security information, and so on. Spoofing is the element of phishing where the attacker makes themselves seem trustworthy by hiding their real email address, IP address, domain name, or other information  behind a more trustworthy name or address. This makes recipients more likely to respond or click on something and get pulled further into the scam.

With that, it’s easy to see why email authentication is critical. But let’s break down how killing spam and scams is ideal for both recipients (that’s your customers) as well as senders (that’s you!)

Protect Your Subscribers & Brand Reputation

If email authentication didn’t exist, spammers could alter the true source of emails, easily evading spam filters and annoyingly flooding inboxes.

Worse, phishing scams that manipulate things like the sender’s email address, branding, and even links to make them look like a legitimate company — like your company — would be even more rampant.

Should a phishing attack successfully impersonate you or your business and steal passwords or account numbers from customers, that could seriously negatively impact their lives and lead to a loss of trust in your brand, sales, retention, and overall business success.

Secure Sender Score To Improve Email Deliverability

Sender score, or sender reputation, is a grade that ISPs and ESPs give organizations that send email.

A sender’s email reputation plays a crucial role in determining whether the mailbox provider will deliver emails directly, or relegate them to spam folders. The higher this score, the stronger the reputation and more likely it is that the sender’s email will be delivered as expected.

When an email is marked as spam or a phishing attempt, it dings this score — but when an email is delivered to an inbox, opened, and engaged with, this score goes up.

Email authentication is a major factor in this score and in getting ISPs and ESPs to deliver your mail in the first place. It’s the first step toward improving deliverability. Deliverability is critical because if customers aren’t actually seeing your marketing emails, the time and money spent on them is a total waste.

And if your emails are landing in their spam folders instead of their inboxes, folks are a lot less likely to be seeing them.

this graph shows how often people check email inbox. based on Data & Marketing Association's Consumer Email Tracker on 2020, 95% check inbox daily, and 58% check spam daily.

Related reading: Say Goodbye To Spam! A Complete Guide To reCAPTCHA

The 3 Core Elements Of Email Authentication

Now, let’s really get to know the essential puzzle pieces that, when put together correctly (more on that in the next section), create a strong shield of email authentication.

Sender Policy Framework

Originating in the early 2000s, sender policy framework (SPF) was the initial email authentication protocol. It verifies that the mail server sending an email is authorized to send that email from the domain it claims to be from.

DomainKeys Identified Mail

DomainKeys identified mail (DKIM) utilizes a private key stored in your domain and a public key registered in the DNS. The mail server that gets the email checks with your domain that the public key they received aligns with the private key. If they match, this verifies that nobody is impersonating you or your website via a spoofing scheme. Mismatched keys usually lead to an email being marked as spam.

Today, DKIM is considered the bar that emails need to meet to be trusted by most ISPs and ESPs. Messages sent without SPF and/or DKIM will usually throw up red flags and require additional scrutiny before delivery.

Domain Message Authentication Reporting And Conformance

The domain message authentication reporting and conformance (DMARC) protocol empowers domain owners by streamlining SPF and DKIM management.

A website owner creates what’s called a DMARC policy and installs it as a DNS record. This policy signals to the recipient that SPF and DKIM are in place for the incoming email. If an email fails to be authenticated, DMARC tells recipients what to do with the email — such as deliver it to the spam folder or to not deliver it at all. It also tells the recipient to notify the sender about how the email was delivered. Through these reports, you can see how your email authentication protocols are performing and make any tweaks necessary to ensure deliverability.

How To Set Up Email Authentication (4 Steps)

Now that you have the background on how the building blocks of email authentication work, it’s time to learn how to install them in the right order and test their functionality.

Step 1. Add SPF Record To Your DNS

First up, let’s add an SPF record to your DNS. The SPF record is what will denote which IP addresses and domains can send emails from your domain.

First, gather up all the IP addresses that will be sending emails from your domain. You must also include any third-party domains sending emails on your behalf — such as Mailchimp.

Now, it’s time to add a TXT DNS record. This process will look different depending on your web hosting provider. For DreamHost customers, here are instructions on how to add DNS records.

Be sure to select TXT as the record type. For the record value, you’re going to start with this snippet of code: v=spf1 ip4:[IP ADDRESS] -all

Replace [IP ADDRESS] with any IP address that has permission to send emails from your domain. To add more than one, make a space after the first IP address, start with ip4: again, and enter the next IP address. After the IP address(s), you must include the domain for any ESP that’s sending email on your behalf. For example, that’s “spf.mandrillapp.com” for Mailchimp. Your ESP should be able to give you this information.

Altogether, your record value should look something like:

v=spf1 ip4:00.00.00.00 ip4:00.00.00.00 include:spf.example.com -all

Save the record and restart your DNS server to install this first step of email authentication.

Step 2. Configure DKIM Keys And Add To DNS

Implementing DKIM is a good next step as it builds upon SPF and, as noted, is pretty much expected when it comes to modern email security.

The process of creating the keys you need all starts with your ESP, and will vary depending on which one you use.

Generally, what will happen is you’ll be prompted by your ESP to complete some type of domain authentication, which just tells them you and your domain are legit and you’re authorized to use your website to send emails. After this, you should be able to access a public domain key, which is a very long string of numbers, letters, and symbols. Since DKIM is all about matching up two keys, the ESP will likely hold on to a different but matching private version of this key.

With that, we’re going back into your DNS settings and adding another TXT record.

The value for this record will be the public key you just grabbed from your ESP.

That’s it! As always, save your new record and restart your DNS to get the changes into effect.

Step 3. Set Up DMARC DNS Record To Secure Authentication

DMARC should be set up 48 hours after SPF and DKIM have already been installed. So once you’re a few days out, here’s the last DNS record you need to add to round out the authentication trifecta.

The DNS record type will again be TXT. If there’s a time to live (TTL) field, we suggest setting it to one hour.

The value field is where you’re going to put your policy. If you’re new to this, we recommend following Google’s guide to rolling out DMARC and using a policy with no enforcement, such as:

v=DMARC1; p=none; rua=mailto:[EMAIL ADDRESS]

Fill in an email address that you can trust will get checked regularly.

When you’re done, you can save the record and restart your DNS server for the last time for a while.

Going with the example policy above will allow you to get reports on email performance without messages getting marked as spam. These reports will tell you how well your emails are passing authentication checks and whether you need to make any adjustments. Google says to stick with this lenient policy for at least a week. When you’re comfortable, you can slowly change up your policy to be more specific. To learn more about timing and structuring your DMARC policies, we recommend checking out the Google tutorial on DMARC.

Step 4. Check That Your Emails Are Authenticated

Finally, it’s time to verify email authentication status!

You can do this by sending an email from the domain where you added all the DNS records, and then observing whether the correct SPF, DKIM, and DMARC messaging is attached.

In Gmail, open the message, look at the top right corner (where the sent time is displayed), and look for the triple-dot menu. After clicking on that, find and select <> Show original.

screenshot of message settings from the three dogs in the upper righthand corner of a message highlighting where to find the "Show original" option.

A new tab will open with all the details of the email, including any attached SPF, DKIM, and DMARC information at the top.

original message options showing the SPF, DKIM, DMARC options located at the very bottom

Final Note: What About BIMI?

One last thing. You may have heard of brand indicators for message identification (BIMI).

This is one last email authentication protocol that enables the sender to include a branded image with an email for yet another stamp of legitimacy.

This practice was introduced in 2020 but hasn’t gained widespread adoption. Why? Because of cost.

Some email services (including Gmail) require a BIMI record to contain a verified mark certificate (VMC). Right now, those go for more than $1K per year, so among small and even medium-sized businesses that don’t feel the need for that expensive fourth layer of protection, BIMI isn’t a priority.

If you’re interested in learning more about this newest email authentication method and how it’s implemented, Selzy has a robust guide to BIMI.

Need Help On Your Email Authentication Journey?

Wow, if you stuck with us throughout this whole guide and now have your email authentication set up, congratulations!

That’s a huge accomplishment and investment in the success of your email marketing campaigns.

But, if you found yourself getting hung up and looking for more guidance, that’s more than understandable.

We built DreamHost to remove the barriers to business website ownership. That’s why, in addition to fast and reliable hosting options, we also have a pro services team that can help you with any of the technical tasks you can’t — or don’t want to — handle.

Need a little support getting email authentication off the ground so you can keep sales up and customers safe from malicious threats? Put some time on our calendar, we’d love to meet you!

Ad background image

Get Professional Email @yourdomain

Promote your website with every message you send when you set up professional email that matches your domain with DreamHost.

Sign Up Now

The post Email Authentication: How To Avoid The Spam Folder appeared first on Website Guides, Tips & Knowledge.

]]>
Top 100 Linux Commands (You Need To Know) https://www.dreamhost.com/blog/linux-commands/ Mon, 18 Dec 2023 15:00:30 +0000 https://dhblog.dream.press/blog/?p=42725 Linux is the backbone of the internet. It powers nearly 97% of the world’s top web servers. And 55.9% of professional developers lean on Linux for their development needs. Yet, Linux has only a 2.68% desktop market share. Why this gap? The core focus of Linux has never been its user interface. It was instead […]

The post Top 100 Linux Commands (You Need To Know) appeared first on Website Guides, Tips & Knowledge.

]]>
Linux is the backbone of the internet. It powers nearly 97% of the world’s top web servers. And 55.9% of professional developers lean on Linux for their development needs.

Yet, Linux has only a 2.68% desktop market share. Why this gap?

The core focus of Linux has never been its user interface. It was instead designed to give you complete control over your operating system through the command line.

That can make Linux seem intimidating to beginners — And the thousands of available commands only make this more difficult.

In this article, we cover the top 100 most useful Linux commands. Learning just a handful of these commands can help you boost your productivity as a Linux user. Let’s dive right in!

DreamHost Glossary

Linux

Linux refers to a collection of open-source Operating Systems (OS). There’s no single Linux OS. Instead, users can choose from a broad group of Linux distros, all of which provide different experiences.

Read More

What Are Linux Commands?

Linux commands allow you to control your system from the command line interface (CLI) instead of using your mouse or trackpad. They are text instructions entered into the terminal to tell your system exactly what to do.

Commands you enter on the Linux terminal are case-sensitive and follow a syntax like “command -options arguments.” You can combine them for complex tasks using pipelines and redirection.

Some key things to know about Linux commands:

  • They are case-sensitive; for example, “ls” and “LS” mean different things.
  • They follow a specific syntax like “command -options arguments.”
  • They can be combined for complex operations using pipelines and redirection.
  • They give you fine-grained control over your system, which is hard to achieve with graphical interfaces.
  • They allow you to automate tasks through shell scripts and batch processing.
  • They can be used to access system resources like the file system, network, memory, and CPU.
  • They form the basis of interaction with Linux servers and operating systems.

If you’re a programmer that’s just learning to code, you can start practicing your Linux commands without leaving Windows using the Windows Subsystem for Linux. This lets you run Linux from within Windows without dual booting and get the best of both operating systems.

Top 100 Most Useful Linux Commands

Now that you have a basic understanding of what Linux commands are, let’s dive into the top 100 most commonly used Linux commands.

We’ve organized them by category to cover areas like file management, system monitoring, network operations, user administration, and more.

File Management Commands In Linux

File management is a common task on the Linux command line. Here are essential file commands:

1. ls – List Directory Contents

The ls command is one of the most frequently used Linux commands. It lists the contents of a directory, showing all files and subdirectories contained inside.

Without any options or arguments, ls will display the contents of the current working directory. You can pass a path name to list files and folders in that location instead.

Syntax:

ls [options] [directory]

Some of the most useful ls options include:

  • -l – Display results in long format, showing extra details like permissions, ownership, size, and modification date for each file and directory.
  • -a – Show hidden files and directories that start with . in addition to non-hidden items.
  • -R – Recursively list all subdirectory contents, descending into child folders indefinitely.
  • -S – Sort results by file size, largest first.
  • -t – Sort by timestamp, newest first.

Example:

ls -l /home/user/documents

This would list the contents of the “documents” folder in long format.

Example output:

total 824
-rwxrwx--- 1 user user    8389 Jul 12 08:53 report.pdf
-rw-r--r-- 1 user user   10231 Jun 30 16:32 presentation.pptx
drwxr-xr-x 2 user user    4096 May 11 09:21 images
-rw-rw-r-- 1 user user     453 Apr 18 13:32 todo.txt

This output shows a detailed list with permissions, size, owner, and timestamp for each file and directory. The long listing format given by the -l option provides helpful file information at a glance.

The ls command gives you flexible control over directory content listing. It’s one of the commands you’ll find yourself using constantly when working on Linux.

2. cd – Change Directory

The cd command is used to navigate between directories. It allows you to move the current working directory to a new location in the filesystem.

When you run the cd command by itself, it will return you to the home directory. You can also pass a specific path to change into. For example:

  • cd /usr/local – Changes to the /usr/local directory.
  • cd .. – Moves up one level to the parent directory.
  • cd ~/pictures – Changes to the pictures folder in your home directory.

Syntax:

cd [directory]

Example:

cd /home/user/documents

This would change the working directory to the “documents” folder under /home/user. Using cd is essential for being able to access and work with files in different locations conveniently.

3. mkdir – Create A New Directory

The mkdir command allows you to create a new folder. You simply pass the name of the directory to create.

Syntax:

mkdir [options] <directory>

This will create a directory called “newproject” in the current working directory.

Some useful mkdir options:

  • -p – Creates parent directories recursively as needed.
  • -v – Verbose output showing created directories.

Example:

mkdir -v ~/project/code

This would create the “code” subdirectory under “project” in the user’s home folder, with verbose output showing the directory being created.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

4. rmdir – Remove Directory

To delete an empty directory, use the rmdir command. Note that rmdir can only remove empty directories – we’ll need the rm command to delete non-empty ones.

Syntax:

rmdir [options] <directory>

Some options for rmdir include:

  • -v – Verbose output when deleting directories.
  • -p – Remove parent directories recursively as needed.

Example:

rmdir -v ~/project/code

This would delete the “code” subdirectory under “project” while showing verbose output.

5. touch – Create A New Empty File

The touch command is used to create a new empty file instantly. This is useful when you need an empty file to populate with data later.

The basic syntax of touch is:

touch [options] filename

Some useful options for touch include:

  • -c – Do not create the file if it already exists. This avoids accidentally overwriting existing files.
  • -m – Instead of creating a new file, update the timestamp on an existing file. This can be used to change the modified time.

For example:

touch /home/user/newfile.txt

The above command creates a new empty file called “newfile.txt” in the user’s /home/user directory. If newfile.txt already exists, it will update the access and modification times on the file instead.

6. cp – Copy Files And Directories

The cp command copies files or directories from one location to another. It requires passing a source path and a destination.

The basic syntax of cp is:

cp [options] source destination

Some useful cp options:

  • -r – Copy directories recursively, descending into child directories to copy their contents as well. Necessary when copying directories.
  • -i – Prompt before overwriting any existing files at the destination. It prevents accidentally overwriting data.
  • -v – Display verbose output showing the details of each file as it is copied. Helpful to confirm exactly what was copied.

For example:

cp -r /home/user/documents /backups/

This would recursively copy the /home/user/documents directory and all its contents to the /backups/ directory. The -r option is needed to copy directories.

The cp command is one of the most frequently used file management utilities for copying files and directories in Linux. You’ll find yourself using this command quite often.

7. mv – Move Or Rename Files And Directories

The mv command is used to move files or directories to a different location or rename them. Unlike copy, the files from the source path are deleted after they’ve been moved to the destination.

You can also use the mv command to rename files since you simply need to change the source and destination paths to the old and new name.

The syntax of mv is:

mv [options] source destination

Useful mv options:

  • -i – Prompt before overwriting any existing files at the destination location. This prevents accidentally overwriting data.
  • -v – Produce verbose output showing each file or directory as it is moved. This is helpful for confirming exactly what was moved.

For example:

mv ~/folder1 /tmp/folder1

The above will move folder1 from the home (~) directory to the /tmp/ directory. Let’s look at another example of using the mv command for renaming files.

mv folder1 folder2

Here, “folder1” is renamed to “folder2.

8. rm – Remove Files And Directories

The rm command deletes files and directories. Use caution because deleted files and directories cannot be recovered.

The syntax is:

rm [options] name

Useful rm options:

  • -r – Recursively delete directories, including all contents inside them. This is necessary when deleting directories.
  • -f – Force deletion and suppress all confirmation prompts. This is a dangerous command, as files cannot be recovered when they’re gone!
  • -i – Prompt for confirmation before deleting each file or directory, which provides safety against accidental removal.

For example:

rm -rf temp

This recursively deletes the “temp” directory and all its contents without prompting (-f overrides confirmations).

Note: The rm command permanently erases files and folders, so use it with extreme care. If used with sudo privileges, you could also delete the root directory completely, and Linux would no longer function after restarting your computer. 

9. find – Search For Files In A Directory Hierarchy

The find command recursively searches directories for files matching given criteria.

The basic syntax of find is:

find [path] [criteria]

Some useful criteria options for find include:

  • -type f – Search for only normal files, omitting directories.
  • -mtime +30 – Search for files modified over 30 days ago.
  • -user jane – Search for files belonging to user “jane.”

For example:

find . -type f -mtime +30

This will find all regular files over 30 days old under the current directory (denoted by the dot).

The find command allows searching for files based on all kinds of advanced conditions like name, size, permissions, timestamps, ownership, and more.

10. du – Estimate File Space Usage

The du command measures the file space usage for a given directory. When used without options, it displays disk usage for the current working directory.

The syntax for du is:

du [options] [path]

Useful du options:

  • -h – Display file sizes in human-readable format like K for Kilobytes rather than a byte count. Much easier to parse.
  • -s – Only show the total size for a directory, rather than listing each subdirectory and file. Good for summary.
  • -a – Show individual file sizes in addition to totals. Helps identify large files.

For example:

du -sh pictures

This will print a human-readable size total for the “pictures” directory.

The du command is helpful for analyzing disk usage for a directory tree and identifying files consuming excessive space.

Search And Filter Commands In Linux

Now, let’s explore commands that allow you to search, filter, and manipulate text right from the Linux command line.

11. grep – Search Text Using Patterns

The grep command is used to search for text patterns within files or output. It prints any lines that match the given regular expression. grep is extremely powerful for searching, filtering, and pattern matching in Linux.

Here is the basic syntax:

grep [options] pattern [files]

For example:

grep -i "error" /var/log/syslog

This searches the syslog file for the word “error,” ignoring case sensitivity.

Some useful grep options:

  • -i – Ignore case distinctions in patterns
  • -R – Recursively search subdirectories
  • -c – Print only a count of matching lines
  • -v – Invert match, print non-matching lines

grep allows you to search files and output for keywords or patterns quickly. It’s invaluable for parsing logs, searching source code, matching regexes, and extracting data.

12. awk – Pattern Scanning And Processing Language

The awk command allows more advanced text processing based on specified patterns and actions. It operates on a line-by-line basis, splitting each line into fields.

awk syntax is:

awk 'pattern { action }' input-file

For example:

awk '/error/ {print $1}' /var/log/syslog

This prints the first field of any line containing “error.” awk can also use built-in variables like NR (number of records) and NF (number of fields).

Advanced awk capabilities include:

  • Mathematical computations on fields
  • Conditional statements
  • Built-in functions for manipulating strings, numbers, and dates
  • Output formatting control

This makes awk suitable for data extraction, reporting, and transforming text output. awk is extremely powerful since it is an independent programming language giving you a lot of control as a Linux command.

13. sed – Stream Editor For Filtering And Transforming Text

The sed command allows filtering and transformation of text. It can perform operations like search/replace, deletion, transposition, and more. However, unlike awk, sed was designed for editing lines on a per-line basis as per the instructions.

Here’s the basic syntax is:

sed options 'commands' input-file

For example:

sed 's/foo/bar/' file.txt

This replaces “foo” with “bar” in file.txt.

Some useful sed commands:

  • s – Search and replace text
  • /pattern/d – Delete lines matching a pattern
  • 10,20d – Delete lines 10-20
  • 1,3!d – Delete all except lines 1-3

sed is ideal for tasks like bulk find/replace, selective line deletion, and other text stream editing operations.

14. sort – Sort Lines Of Text Files

When you’re working with a lot of text or data or even large outputs from other commands, sorting it is a great way to make things manageable. The sort command will sort the lines of a text file alphabetically or numerically.

Basic sort syntax:

sort [options] [file]

Useful sort options:

  • -n – Sort numerically instead of alphabetically
  • -r – Reverse the sort order
  • -k – Sort based on a specific field or column

For example:

sort -n grades.txt

This numerically sorts the contents of grades.txt. sort is handy for ordering the contents of files for more readable output or analysis.

15. uniq – Report Or Omit Repeated Lines

The uniq command filters duplicate adjacent lines from input. This is often used in conjunction with sort.

Basic syntax:

uniq [options] [input]

Options:

  • -c – Prefix unique lines with count of occurrences.
  • -d – Only show duplicated lines, not unique ones.

For example:

sort data.txt | uniq

This will remove any duplicated lines in data.txt after sorting. uniq gives you control over filtering repeated text.

16. diff – Compare Files Line By Line

The diff command compares two files line-by-line and prints the differences. It’s commonly used to show changes between versions of files.

Syntax:

diff [options] file1 file2

Options:

  • -b – Ignore changes in whitespace.
  • -B – Show differences inline, highlighting changes.
  • -u – Output differences with three lines of context.

For example:

diff original.txt updated.txt

This will output the lines that differ between original.txt and updated.txt. diff is invaluable for comparing revisions of text files and source code.

17. wc – Print Line, Word, And Byte Counts

The wc (word count) command prints counts of lines, words, and bytes in a file.

Syntax:

wc [options] [file]

Options:

  • -l – Print only the line count.
  • -w – Print only the word count.
  • -c – Print only the byte count.

For example:

wc report.txt

This command will print the number of lines, words, and bytes in report.txt.

Redirection Commands In Linux

Redirection commands are used to control input and output sources in Linux, allowing you to send and append output streams to files, take input from files, connect multiple commands, and split output to multiple destinations.

18. > – Redirect Standard Output

The > redirection operator redirects the standard output stream from the command to a file instead of printing to the terminal. Any existing contents of the file will be overwritten.

For example:

ls -l /home > homelist.txt

This will execute ls -l to list the contents of the /home directory.

Then, instead of printing that output to the terminal, the > symbol captures that standard output and writes it to homelist.txt, overwriting any existing file contents.

Redirecting standard output is helpful for saving command results to files for storage, debugging, or chaining commands together.

19. >> – Append Standard Output

The >> operator appends standard output from a command to a file without overwriting existing contents.

For example:

tail /var/log/syslog >> logfile.txt

This will append the last 10 lines of the syslog log file onto the end of logfile.txt. Unlike >, >> adds the output without erasing the current logfile.txt contents.

Appending is helpful in collecting command output in one place without losing existing data.

20. < – Redirect Standard Input

The < redirection operator feeds a file’s contents as standard input to a command, instead of taking input from the keyboard.

For example:

wc -l < myfile.txt

This sends the contents of myfile.txt as input to the wc command, which will count lines in that file instead of waiting for keyboard input.

Redirecting input is useful for batch-processing files and automating workflows.

21. | – Pipe Output To Another Command

The pipe | operator sends the output from one command as input to another command, chaining them together.

For example:

ls -l | less

This pipes the output of ls -l into the less command, which allows scrolling through the file listing.

Piping is commonly used to chain together commands where the output of one feeds the input of another. This allows building complex operations out of smaller single-purpose programs.

22. tee – Read From Standard Input And Write To Standard Output And Files

The tee command splits standard input into two streams.

It writes the input to standard output (shows the output of the main command) while also saving a copy to a file.

For example:

cat file.txt | tee copy.txt

This displays file.txt contents to the terminal while simultaneously writing it to copy.txt.

tee is unlike redirecting, where you don’t see the output until you open the file you’ve redirected the output to.

Archive Commands

Archiving commands allow you to bundle multiple files and directories into compressed archive files for easier portability and storage. Common archive formats in Linux include .tar, .gz, and .zip.

23. tar – Store And Extract Files From An Archive

The tar command helps you work with tape archive (.tar) files. It helps you bundle multiple files and directories into a single compressed .tar file.

Syntax:

tar [options] filename

Useful tar options:

  • -c – Create a new .tar archive file.
  • -x – Extract files from a .tar archive.
  • -f – Specify archive filename rather than stdin/stdout.
  • -v – Verbose output showing archived files.
  • -z – Compress or uncompress archive with gzip.

For example:

tar -cvzf images.tar.gz /home/user/images

This creates a gzip-compressed tar archive called images.tar.gz containing the /home/user/images folder.

24. gzip – Compress Or Expand Files

The gzip command compresses files using LZ77 coding to reduce size for storage or transmission. With gzip, you work with .gz files.

Syntax:

gzip [options] filename

Useful gzip options:

  • -c – Write output to stdout instead of file.
  • -d – Decompress file instead of compressing.
  • -r – Recursively compress directories.

For example:

gzip -cr documents/

The above command recursively compresses the documents folder and outputs to stdout.

25. gunzip – Decompress Files

The gunzip command is used for decompressing .gz files.

Syntax:

gunzip filename.gz

Example:

gunzip documents.tar.gz

The above command will extract the original uncompressed contents of documents.tar.gz.

26. zip – Package And Compress Files

The zip command creates .zip archived files containing compressed file contents.

Syntax:

zip [options] archive.zip filenames

Useful zip options:

  • -r – Recursively zip a directory.
  • -e – Encrypt contents with a password.

Example:

zip -re images.zip pictures

This encrypts and compresses the pictures folder into images.zip.

27. unzip – Extract Files From ZIP Archives

Similar to gunzip, the unzip command extracts and uncompresses files from .zip archives.

Syntax:

unzip archive.zip

Example:

unzip images.zip

The above example command extracts all files from images.zip in the current directory.

File Transfer Commands

File transfer commands allow you to move files between systems over a network. This is useful for copying files to remote servers or downloading content from the internet.

28. scp – Secure Copy Files Between Hosts

The scp (secure copy) command copies files between hosts over an SSH connection. All data transfer is encrypted for security.

scp syntax copies files from a source path to a destination defined as user@host:

scp source user@host:destination

For example:

scp image.jpg user@server:/uploads/

This securely copies image.jpg to the /uploads folder on server as user.

scp works like the cp command but for remote file transfer. It leverages SSH (Secure Shell) for data transfer, providing encryption to ensure that no sensitive data, such as passwords, are exposed over the network. Authentication is typically handled using SSH keys, though passwords can also be used. Files can be copied both to and from remote hosts.

29. rsync – Synchronize Files Between Hosts

The rsync tool synchronizes files between two locations while minimizing data transfer using delta encoding. This makes it faster to sync large directory trees.

rsync syntax syncs source to destination:

rsync [options] source destination

For example:

rsync -ahv ~/documents user@server:/backups/

The above example command recursively syncs the documents folder to server:/backups/, showing verbose, human-readable output.

Useful rsync options:

  • -a – Archive mode syncs recursively and preserves permissions, times, etc.
  • -h – Human-readable output.
  • -v – Verbose output.

rsync is ideal for syncing files and folders to remote systems and keeping things decentrally backed up and secure.

30. sftp – Secure File Transfer Program

The sftp program provides interactive file transfers over SSH, similar to regular FTP but encrypted. It can transfer files to/from remote systems.

sftp connects to a host then accepts commands like:

sftp user@host

get remotefile localfile

put localfile remotefile

This retrieves remotefile from the server and copies localfile to the remote host.

sftp has an interactive shell for navigating remote file systems, transferring files and directories, and managing permissions and properties.

31. wget – Retrieve Files from the Web

The wget tool downloads files over HTTP, HTTPS, and FTP connections. It’s useful for retrieving web resources directly from the terminal.

For example:

wget https://example.com/file.iso

This downloads the file.iso image from the remote server.

Useful wget options:

  • -c – Resume interrupted download.
  • -r – Download recursively.
  • -O – Save to specific filename.

wget is ideal for scripting automatic downloads and mirroring websites.

32. curl – Transfer Data From Or To A Server

The curl command transfers data to or from a network server using supported protocols. This includes REST, HTTP, FTP, and more.

For example:

curl -L https://example.com

The above command retrieves data from the HTTPS URL and outputs it.

Useful curl options:

  • -o – Write output to file.
  • -I – Show response headers only.
  • -L – Follow redirects.

curl is designed to transfer data across networks programmatically.

File Permissions Commands

File permissions commands allow you to modify access rights for users. This includes setting read/write/execute permissions, changing ownership, and default file modes.

33. chmod – Change File Modes Or Access Permissions

The chmod command is used to change the access permissions or modes of files and directories. The permission modes represent who can read, write, or execute the file.

For example:

chmod 755 file.txt

There are three sets of permissions—owner, group, and public. Permissions are set using numeric modes from 0 to 7:

  • 7 – read, write, and execute.
  • 6 – read and write.
  • 4 – read only.
  • 0 – no permission.

This sets the owner permissions to 7 (rwx), group to 5 (r-x), and public to 5 (r-x). You can also reference users and groups symbolically:

chmod g+w file.txt

The g+w syntax adds group write permission to the file.

Setting proper file and directory permissions is crucial for Linux security and controlling access. chmod gives you flexible control to configure permissions precisely as needed.

34. chown – Change File Owner And Group

The chown command changes ownership of a file or directory. Ownership has two components—the user who is the owner, and the group it belongs to.

For example:

chown john:developers file.txt

The above example command will set the owner user to “john” and the owner group to “developers.”

Only the root superuser account can use chown to change file owners. It’s used to fix permission problems by modifying the owner and group as needed.

35. umask – Set Default File Permissions

The umask command controls the default permissions given to newly created files. It takes an octal mask as input, which subtracts from 666 for files and 777 for directories.

For example:

umask 007

New files will default to permissions 750 instead of 666, and new directories to 700 instead of 777.

Setting a umask lets you configure default file permissions rather than relying on system defaults. The umask command is useful for restricting permissions on new files without relying on someone going in and manually adding restrictions.

Process Management Commands

These commands allow you to view, monitor, and control processes running on your Linux system. This is useful for identifying resource usage and stopping misbehaving programs.

36. ps – Report A Snapshot Of Current Processes

The ps command displays a snapshot of currently running processes, including their PID, TTY, stat, start time, etc.

For example:

ps aux

This shows every process running as all users with additional details like CPU and memory usage.

Some useful ps options:

  • aux – Show processes for all users
  • --forest – Display tree of parent/child processes

ps gives you visibility into what’s currently running on your system.

37. top – Display Linux Processes

The top command shows real-time Linux process information, including PID, user, CPU %, memory usage, uptime, and more. Unlike ps, it updates the display dynamically to reflect current usage.

For example:

top -u mysql

The above command monitors processes just for the “mysql” user. It becomes quite helpful in identifying resource-intensive programs.

38. htop – Interactive Process Viewer

The htop command is an interactive process viewer replacing the top command. It shows system processes along with CPU/memory/swap usage graphs, allows sorting by columns, killing programs, and more.

Simply type in htop in the command line to view your processes.

htop has enhanced UI elements with colors, scrolling, and mouse support for easier navigation compared to top. Excellent for investigating processes.

bar graph showing that developers prefer Linux (76.9%) compared to Docker (73.6%) and Kubernetes (71.1%)

39. kill – Send A Signal To A Process

The kill command sends a signal to a process to terminate or kill it. Signals allow graceful shutdown if the process handles them.

For example:

kill -15 12345

The above command sends the SIGTERM (15) signal to stop the process with PID 12345 gracefully.

40. pkill – Send A Signal To A Process Based On Name

The pkill command kills processes by name instead of PID. It can make things easier than finding the PID first.

For example:

pkill -9 firefox

This forcibly stops all Firefox processes with SIGKILL (9). pkill targets processes by matching name, user, and other criteria instead of the PID.

41. nohup – Run A Command Immune To Hangups

The nohup command runs processes immune to hangups, so they keep running if you log out or get disconnected.

For example:

nohup python script.py &

The above example command will launch script.py detached in the background and immune to hangups. nohup is generally used to start persistent background daemons and services.

Performance Monitoring Commands

These commands provide valuable system performance statistics to help analyze resource utilization, identify bottlenecks, and optimize efficiency.

42. vmstat – Report Virtual Memory Statistics

The vmstat command prints detailed reports on memory, swap, I/O, and CPU activity. This includes metrics like memory used/free, swap in/out, disk blocks read/written, and CPU time spent on processes/idle.

For example:

vmstat 5

Other useful vmstat options:

  • -a – Show active and inactive memory
  • -s – Display event counters and memory stats
  • -S – Output in KB instead of blocks
  • 5 – Output refreshed every 5 seconds.

The example above outputs memory and CPU data every 5 seconds until interrupted, which is useful for monitoring live system performance.

43. iostat – Report CPU And I/O Statistics

The iostat command monitors and displays CPU utilization and disk I/O metrics. This includes CPU load, IOPS, read/write throughput, and more.

For example:

iostat -d -p sda 5

Some iostat options:

  • -c – Display CPU utilization info
  • -t – Print timestamp for each report
  • -x – Show extended stats like service times and wait counts
  • -d – Show detailed stats per disk/partition instead of aggregate totals
  • -p – Display stats for specific disk devices

This shows detailed per-device I/O stats for sda every 5 seconds.

iostat helps analyze disk subsystem performance and identify hardware bottlenecks.

44. free – Display Amount Of Free And Used Memory

The free command shows the total, used and free amounts of physical and swap memory on the system. This gives an overview of available memory.

For example:

free -h

Some options for the free command:

  • -b – Display output in bytes
  • -k – Show output in KB instead of default bytes
  • -m – Show output in MB instead of bytes
  • -h – Print statistics in human-readable format like GB, MB instead of bytes.

This prints memory statistics in human-readable format (GB, MB, etc). It’s useful when you want a quick overview of memory capacity.

45. df – Report File System Disk Space Usage

The df command displays disk space usage for file systems. It shows the filesystem name, total/used/available space, and capacity.

For example:

df -h

The above command will print the disk utilization in a human-readable format. You can also run it without arguments to get the same data in block sizes.

46. sar – Collect And Report System Activity

The sar tool collects and logs system activity information on CPU, memory, I/O, network, and more over time. This data can be analyzed to identify performance issues.

For example:

sar -u 5 60

This samples CPU usage every 5 seconds for a duration of 60 samples.

sar provides detailed historical system performance data not available in real-time tools.

User Management Commands

When using multi-user systems, you may need commands that help you manage users and groups for access control and permissions. Let’s cover those commands here.

47. useradd – Create A New User

The useradd command creates a new user account and home directory. It sets the new user’s UID, group, shell, and other defaults.

For example:

useradd -m john

Useful useradd options:

  • -m – Create the user’s home directory.
  • -g – Specify the primary group instead of the default.
  • -s – Set the user’s login shell.

The above command will create a new user, “john,” with a generated UID and home folder created at /home/john.

48. usermod – Modify A User Account

The usermod command modifies the settings of an existing user account. This can change the username, home dir, shell, group, expiry date, etc.

For example:

usermod -aG developers john

With this command, you add a user john to an additional group—“developers.” The -a appends to the existing list of groups that the user is added to.

49. userdel – Delete A User Account

The userdel command deletes a user account, home directory, and mail spool.

For example:

userdel -rf john

Helpful userdel options:

  • -r – Remove the user’s home directory and mail spool.
  • -f – Force deletion even if the user is still logged in.

This forces the removal of user “john,” deleting associated files.

Specifying options like -r and -f with userdel ensures the user account is entirely deleted even if the user is logged in or has active processes.

50. groupadd – Add A Group

The groupadd command creates a new user group. Groups represent teams or roles for permissions purposes.

For example:

groupadd -r sysadmin

Useful groupadd options:

  • -r – Create a system group used for core system functions.
  • -g – Specify the new group’s GID instead of using next available.

The above command creates a new “sysadmin” group with system privileges. When creating new groups, the -r or -g help set them up correctly.

51. passwd – Update User’s Authentication Tokens

The passwd command sets or updates a user’s authentication password/tokens. This allows changing your login password.

For example:

passwd john

This prompts user “john” to enter a new password interactively. If you’ve lost the password for an account, you may want to login to Linux with sudo or su privileges and change the password using the same method.

Networking Commands

These commands are used for monitoring connections, troubleshooting network issues, routing, DNS lookups, and interface configuration.

52. ping – Send ICMP ECHO_REQUEST To Network Hosts

The ping command verifies connectivity to a remote host by sending ICMP echo request packets and listening for echo responses.

For example:

ping google.com
PING google.com (142.251.42.78): 56 data bytes
64 bytes from 142.251.42.78: icmp_seq=0 ttl=112 time=8.590 ms
64 bytes from 142.251.42.78: icmp_seq=1 ttl=112 time=12.486 ms
64 bytes from 142.251.42.78: icmp_seq=2 ttl=112 time=12.085 ms
64 bytes from 142.251.42.78: icmp_seq=3 ttl=112 time=10.866 ms
--- google.com ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 8.590/11.007/12.486/1.518 ms

Useful ping options:

  • -c [count] – Limit packets sent.
  • -i [interval] – Wait interval seconds between pings.

With the above command, you ping google.com and outputs round-trip stats indicating connectivity and latency. Generally, ping is used to check if a system you’re trying to connect to is alive and connected to the network.

53. ifconfig – Configure Network Interfaces

The ifconfig command displays and configures network interface settings, including IP address, netmask, broadcast, MTU, and hardware MAC address.

For example:

ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
inet6 fe80::a00:27ff:fe1e:ef1d  prefixlen 64  scopeid 0x20<link>
ether 08:00:27:1e:ef:1d  txqueuelen 1000  (Ethernet)
RX packets 23955654  bytes 16426961213 (15.3 GiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 12432322  bytes 8710937057 (8.1 GiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Running ifconfig with no other arguments will give you a list of all the network interfaces available for use, along with IP and additional network information. ifconfig can also be used to set addresses, enable/disable interfaces, and change options.

54. netstat – Network Statistics

The netstat command shows you the network connections, routing tables, interface stats, masquerade connections, and multicast memberships.

For example:

netstat -pt tcp

This command will output all the active TCP connections and the processes using them.

55. ss – Socket Statistics

The ss command dumps socket statistical information similar to netstat. It can show open TCP and UDP sockets, send/receive buffer sizes, and more.

For example:

ss -t -a

This prints all open TCP sockets. More efficient than netstat.

56. traceroute – Trace Route To Host

The traceroute command prints the route packets take to a network host, showing each hop along the way and transit times. Useful for network debugging.

For example:

traceroute google.com

This traces the path to reach google.com and outputs each network hop.

57. dig - DNS Lookup

The dig command performs DNS lookups and returns information about DNS records for a domain.

For example:

dig google.com
; <<>> DiG 9.10.6 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60290
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 220 IN A 142.251.42.78
;; Query time: 6 msec
;; SERVER: 2405:201:2:e17b::c0a8:1d01#53(2405:201:2:e17b::c0a8:1d01)
;; WHEN: Wed Nov 15 01:36:16 IST 2023
;; MSG SIZE  rcvd: 55

This queries DNS servers for records related to google.com and prints details.

58. nslookup – Query Internet Name Servers Interactively

The nslookup command queries DNS servers interactively to perform name resolution lookups or display DNS records.

It enters an interactive shell, allowing you to manually lookup hostnames, reverse IP addresses, find DNS record types, and more.

For example, some common nslookup usage. Type nslookup on your command line:

nslookup

Next, we’ll set Google’s 8.8.8.8 DNS server for lookups.

> server 8.8.8.8

Now, let’s query the A record of stackoverflow.com to find its IP address.

> set type=A
> stackoverflow.com
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: stackoverflow.com
Address: 104.18.32.7
Name: stackoverflow.com
Address: 172.64.155.249

Now, let’s find the MX records for github.com to see its mail servers.

> set type=MX
> github.com
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
github.com mail exchanger = 1 aspmx.l.google.com.
github.com mail exchanger = 5 alt1.aspmx.l.google.com.
github.com mail exchanger = 5 alt2.aspmx.l.google.com.
github.com mail exchanger = 10 alt3.aspmx.l.google.com.
github.com mail exchanger = 10 alt4.aspmx.l.google.com.

The interactive queries make nslookup very useful for exploring DNS and troubleshooting name resolution issues.

59. iptables – IPv4 Packet Filtering And NAT

The iptables command allows configuring Linux netfilter firewall rules to filter and process network packets. It sets up policies and rules for how the system will handle different types of inbound and outbound connections and traffic.

For example:

iptables -A INPUT -s 192.168.1.10 -j DROP

The above command will block all input from IP 192.168.1.10.

iptables provides powerful control over the Linux kernel firewall to handle routing, NAT, packet filtering, and other traffic control. It is a critical tool for securing Linux servers.

60. ip – Manage Network Devices And Routing

The ip command allows managing and monitoring various network device related activities like assigning IP addresses, setting up subnets, displaying link details, and configuring routing options.

For example:

ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:8a:5c:04 brd ff:ff:ff:ff:ff:ff

The above command shows all the network interfaces, their status, and other information.

This command aims to replace ifconfig with more modern Linux network management. ip can control network devices, routing tables, and other network stack settings.

Package Management Commands

Package managers allow easy installation, update and removal of software on Linux distributions. Popular package managers include APT, YUM, DNF, Pacman, and Zypper.

61. apt – Debian/Ubuntu Package Manager

The apt command manages packages on Debian/Ubuntu systems using the APT repository. It allows installing, updating, and removing packages.

For example:

apt update

This command fetches the latest package versions and metadata from the repositories.

apt install nginx

You can install the nginx package from the configured APT repositories using the above command.

apt upgrade

And this command upgrades packages and dependencies to newer versions.

APT makes installing software easy by fetching packages from repositories.

62. pacman – Arch Linux Package Manager

pacman manages packages on Arch Linux from the Arch User Repository. It can install, upgrade, and remove packages.

For example:

pacman -S nmap

This installs the nmap package from the configured repositories.

pacman -Syu

This synchronizes with repositories and upgrades all packages.

pacman keeps Arch Linux up-to-date and allows easy management of packages.

63. dnf – Fedora Package Manager

dnf installs, updates, and removes packages on Fedora Linux distributions using RPM packages. It replaces Yum as the next-gen package manager.

For example:

dnf install util-linux

This installs the util-linux package.

dnf upgrade

This upgrades all installed packages to the latest versions.

dnf makes Fedora package management fast and efficient.

64. yum – Red Hat Package Manager

yum manages packages on RHEL and CentOS Linux distributions using RPM packages. It fetches from Yum repositories to install and update.

For example:

yum update

This updates all installed packages to the latest versions.

yum install httpd

The above command installs the Apache httpd package. yum has been the major package manager for keeping Red Hat distributions updated.

65. zypper – OpenSUSE Package Manager

zypper manages packages on SUSE/openSUSE Linux. It can add repositories, search, install, and upgrade packages.

For example:

zypper refresh

The refresh command for zypper refreshes repository metadata from added repositories.

zypper install python

This installs the Python package from configured repositories. zypper makes the package management experience effortless on SUSE/openSUSE systems.

66. flatpak – Flatpak Application Package Manager

The flatpak command helps you manage Flatpak applications and runtimes. flatpak allows sandboxed desktop application distribution across Linux.

For example:

flatpak install flathub org.libreoffice.LibreOffice

For instance, the above command will install LibreOffice from the Flathub repository.

flatpak run org.libreoffice.LibreOffice

And this one launches the sandboxed LibreOffice Flatpak application. flatpak provides a centralized cross-distro Linux application repository so you’re no longer limited to packages available with a specific distro’s package library.

67. appimage – AppImage Application Package Manager

AppImage packages are self-contained applications that run on most Linux distributions. The appimage command runs existing AppImages.

For example:

chmod +x myapp.AppImage
./myapp.AppImage

This allows running the AppImage binary file directly.

AppImages allow application deployment without system-wide installation. Think of them like small containers that include all the files to enable the app to run without too many external dependencies.

68. snap – Snappy Application Package Manager

The snap command manages snaps—containerized software packages. Snaps auto-update and work across Linux distributions similar to Flatpak.

For example:

snap install vlc

This simple command installs the VLC media player snap.

snap run vlc

Once installed, you can use snap to run packages that are installed via snap by using the above command. Snaps isolate apps from the base system for portability and allow cleaner installs.

System Information Commands

These commands allow you to view details about your Linux system hardware, kernel, distributions, hostname, uptime, and more.

69. uname – Print System Information

The uname command prints detailed information about the Linux system kernel, hardware architecture, hostname, and operating system. This includes version numbers and machine info.

For example:

uname -a
Linux hostname 5.4.0-48-generic x86_64 GNU/Linux

uname is useful for querying these core system details. Some options include:

  • -a – Print all available system info
  • -r – Print just the kernel release number

The above command printed extended system information, including kernel name/version, hardware architecture, hostname, and OS.

uname -r

This will print only the kernel release number. The uname command shows details about your Linux system’s core components.

70. hostname – Show Or Set The System’s Host Name

The hostname command prints or sets the hostname identifier for your Linux system on the network. With no arguments it displays the current hostname. Passing a name will update the hostname.

For example:

hostname
linuxserver

This prints linuxserver — the configured system hostname.

hostname UbuntuServer

hostnames identify systems on a network. hostname gets or configures the identifying name of your system on the network. The second command helps you change the local hostname to UbuntuServer.

71. uptime – How Long The System Has Been Running

The uptime command shows how long the Linux system has been running since it was last rebooted. It prints the uptime and current time.

Simply run the following command to get your system uptime data:

uptime
23:51:26 up 2 days, 4:12, 1 user, load average: 0.00, 0.01, 0.05

This prints the system uptime showing how long the system has been on since last boot.

72. whoami – Print Active User ID

The whoami command prints the effective username of the current user logged into the system. It displays the privilege level you are operating at.

Type the command in your terminal to get the ID:

whoami
john

This prints the effective username that the current user is logged in and operating as and is useful in scripts or diagnostics to identify what user account actions are being performed as.

73. id – Print Real And Effective User And Group IDs

The id command prints detailed user and group information about the effective IDs and names of the current user. This includes:

  • Real user ID and name.
  • Effective user ID and name.
  • Real group ID and name.
  • Effective group ID and name.

To use the id command, simply type: 

id
uid=1000(john) gid=1000(john) groups=1000(john),10(wheel),998(developers)

The id command prints the current user’s real and effective user and group IDs. id displays user and group details useful for determining file access permissions.

74. lscpu – Display CPU Architecture Information

The lscpu command shows detailed CPU architecture information, including:

  • Number of CPU cores
  • Number of sockets
  • Model name
  • Cache sizes
  • CPU frequency
  • Address sizes

To use the lscpu command, simply type: 

lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              16
On-line CPU(s) list: 0-15

lscpu details the CPU architecture like the number of cores, sockets, model name, caches, and more.

75. lsblk – List Block Devices

The lsblk command lists information about all available block devices, including local disks, partitions, and logical volumes. The output includes device names, labels, sizes, and mount points.

lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0   1.8T  0 disk
|-sda1    8:1    0   512M  0 part  /boot
|-sda2    8:2    0    16M  0 part
`-sda5    8:5    0   1.8T  0 part
`-lvm1 254:0    0   1.8T  0 lvm   /

lsblk lists all the block devices, including disks, partitions, and logical volumes. Gives an overview of storage devices.

76. lsmod – Show The Status of Modules In The Linux Kernel

The lsmod command prints currently loaded kernel modules like device drivers. This includes networking, storage, and other hardware-related modules being used by the Linux kernel to interface with internal and external devices.

lsmod
Module                  Size  Used by
ipv6                  406206  27
evdev                   17700  0
crct10dif_pclmul       16384  1
crc32_pclmul           16384  0
ghash_clmulni_intel    16384  0
aesni_intel           399871  0
aes_x86_64             20274  1 aesni_intel

As you can see, it lists the currently loaded kernel modules like device drivers. In this case, it shows the use of networking, input, cryptographic and encryption modules.

77. dmesg – Print Or Control The Kernel Ring Buffer

The dmesg command dumps messages from the kernel ring buffer. This includes essential system events recorded by the kernel during start-up and operation.

dmesg | grep -i error
[   12.345678] Error receiving batched read response: -110
[   23.456789] tplink_mdio 0000:03:00.0: Direct firmware load for tplink-mdio/leap_p8_v1_0.bin failed with error -2
[   40.567890] iwlwifi 0000:09:00.0: Direct firmware load for iwlwifi-ty-a0-gf-a0-59.ucode failed with error -2

Grepping for “error” shows issues loading specific firmware. This prints buffered kernel log messages, including system events like start-up, errors, warnings etc.

System Administration Commands

System admin commands help you run programs as other users, shut down or reboot the system, and manage init systems and services.

78. sudo – Execute A Command As Another User

The sudo command allows you to run commands as another user, typically the superuser. After entering the sudo order, it will prompt you for your password to authenticate.

This provides elevated access for tasks like installing packages, editing system files, administering services etc.

For example:

sudo adduser bob
[sudo] password for john:

User ‘bob’ has been added to the system.

This uses sudo to create a new user, ‘bob’. Regular users typically cannot add users without sudo.

79. su – Change User ID Or Become Superuser

The su command allows you to switch to another user account including the superuser. You must provide the target user’s password to authenticate. This gives direct access to run commands in another user’s environment.

For example:

su bob
Password:
bob@linux:~$

After inputting bob’s password, this command switches the current user to the user ‘bob’. The shell prompt will reflect the new user.

80. shutdown – Shutdown Or Restart Linux

The shutdown command schedules a system power off, halt or reboot after a specified timer or immediately. It’s required to reboot or shutdown multi-user Linux systems safely.

For example:

shutdown -r now
Broadcast message from root@linux Fri 2023-01-20 18:12:37 CST:
The system is going down for reboot NOW!

This reboots the system instantly with a warning to users.

81. reboot – Reboot Or Restart System

The reboot command restarts the Linux operating system, logging all users off and safely rebooting the system. It synchronizes disks and brings the system down cleanly before restarting.

For example:

reboot
Restarting system.

This immediately reboots the OS. reboot is a simple alternative to shutdown -r.

82. systemctl – Control The systemd System And Service Manager

The systemctl command allows you to manage systemd services like starting, stopping, restarting, or reloading them. Systemd is the new init system used in most modern Linux distros, replacing SysV init.

For example:

systemctl start apache2
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'apache2.service'.
Authenticating as: User Name
Password:
==== AUTHENTICATION COMPLETE ===

This starts the apache2 service after authenticating.

83. service – Run A System V Init Script

The service command runs System V init scripts for controlling services. This allows starting, stopping, restarting, and reloading services managed under traditional SysV init.

For example:

service iptables start
[ ok ] Starting iptables (via systemctl): iptables.service.

The above command starts the iptables firewall service using its SysV init script.

Other Linux Commands To Try

  1. mount – Mount or “attach” drives to the system.
  2. umount – Umount or “remove” drives from the system.
  3. xargs – Builds and executes commands provided through standard input.
  4. alias – Create shortcuts for long or complex commands.
  5. jobs – List programs currently running jobs in the background.
  6. bg – Resume a stopped or paused background process.
  7. killall – Terminate processes by program name rather than PID.
  8. history – Display previously used commands within the current terminal session.
  9. man – Access help manuals for commands right within the terminal.
  10. screen – Manage multiple terminal sessions from a single window.
  11. ssh – Establish secure encrypted connections to remote servers.
  12. tcpdump – Capture network traffic based on specific criteria.
  13. watch – Repeat a command at intervals and highlight output differences.
  14. tmux – Terminal multiplexer for persistent sessions and splitting.
  15. nc – Open TCP or UDP connections for testing and data transfer.
  16. nmap – Host discovery, port scanning, and OS fingerprinting.
  17. strace – Debug processes by tracing operating system signals and calls.

7 Key Tips For Using Linux Commands

  1. Know your shell: Bash, zsh, fish? Different shells have unique features. Pick the one that suits your needs the best.
  2. Master the core utils: ls, cat, grep, sed, awk, etc form the core of a Linux toolkit.
  3. Stick with pipelines: Avoid excessive uses of temporary files. Pipe programs together cleverly.
  4. Verify before overwriting: Always double check before overwriting files with > and >>.
  5. Track your workflows: Document complex commands and workflows to reuse or share later.
  6. Make your own tools: Write simple shell scripts and aliases for frequent tasks.
  7. Start without sudo: Use a standard user account initially to understand permissions.

And remember to keep testing out new commands over virtual machines or VPS servers so they become second nature to you before you start using them on production servers.

DreamHost Glossary

VPS Hosting

A Virtual Private Server (VPS) is a virtual platform that stores data. Many web hosts offer VPS hosting plans, which give site owners a dedicated, private space on a shared server.

Read More

Better Linux Hosting With DreamHost

After you master the essential Linux commands, you also need a hosting and server provider that gives you full control to take advantage of Linux’s power and flexibility.

That’s where DreamHost shines.

DreamHost’s optimized Linux infrastructure is perfect for running your apps, sites, and services:

  • Fast web hosting on modern Linux servers.
  • SSH shell access for command line control.
  • Customizable PHP versions including PHP 8.0.
  • Apache or NGINX web servers.
  • Managed MySQL, PostgreSQL, Redis databases.
  • 1-click installs of apps like WordPress and Drupal.
  • SSD-accelerated NVMe storage for speed.
  • Free Let’s Encrypt SSL auto-renewal.

DreamHost’s experts can help you get the most out of the Linux platform. Our servers are meticulously configured for security, performance, and reliability.

Launch your next project on a Linux hosting platform you can trust. Get started with robust, scalable hosting at DreamHost.com.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

The post Top 100 Linux Commands (You Need To Know) appeared first on Website Guides, Tips & Knowledge.

]]>
What Is VPS? A Beginner’s Guide to Virtual Private Servers https://www.dreamhost.com/blog/beginners-guide-vps/ Mon, 06 Nov 2023 15:00:59 +0000 https://www.dreamhost.com/blog/?p=14646 Has it happened? Have you hit the big time? Are you finding your website struggles to keep up with all that new visitor traffic? It might be time to upgrade to VPS hosting. VPS, short for virtual private server, gives your site dedicated resources to perform better than shared hosting. In this guide, we’ll dive […]

The post What Is VPS? A Beginner’s Guide to Virtual Private Servers appeared first on Website Guides, Tips & Knowledge.

]]>
Has it happened? Have you hit the big time?

Are you finding your website struggles to keep up with all that new visitor traffic?

It might be time to upgrade to VPS hosting.

VPS, short for virtual private server, gives your site dedicated resources to perform better than shared hosting.

In this guide, we’ll dive into the ins and outs of VPS hosting. What is it? How does it compare to shared or dedicated hosting? We’ll also look at the factors indicating it may be time to upgrade. To sum up, learn how to choose the best VPS hosting plan for your growing business.

Let’s start with the basics.

What Is A Virtual Private Server?

So, what exactly is a virtual private server? Let’s break it down.

  • Server: A server is a powerful computer that stores all the data and files for a website. When you type a domain name into your browser, that server delivers the site to your screen.
  • Virtual: Virtualization technology splits one full server into multiple virtual machines. It’s still one physical piece of hardware, but it operates like several separate servers.
  • Private: The word private is just what it sounds like. Your virtual server and all its virtual resources are reserved just for you, giving you a high-performance hosting environment where the RAM, CPU power, or any data will not be shared with other users.

A VPS offers the advantages of dedicated servers without the high costs associated with dedicated hosting.

How Does A VPS Work?

How Does A VPS Work

VPS hosting uses virtualization technology to simulate having your own dedicated server, even though the physical server is shared.

How does it work?

Well, your hosting provider installs a virtual layer on top of the server’s operating system. This virtual layer separates the server into individual compartments for each user, creating individual virtual machines or VMs.

Within each compartment, you can install your preferred operating system, software, and other required tools to host your website. For example, Linux, MySQL, and a control panel like cPanel.

DreamHost Glossary

cPanel

cPanel is a web-based hosting control panel that provides users with a graphical interface to manage their websites. With cPanel, users can create email accounts, upload files, and change website settings. cPanel is the most popular hosting control panel globally and is used by millions of websites.

Read More

These virtual machines ensure that you get guaranteed resources. And unlike shared hosting, your server’s performance does not depend on how much of the resources other websites on the same server use.

In a nutshell, VPS gives you the experience of having your own dedicated environment through virtualization. Your site lives in a private, isolated container with allocated resources just for you.

This means your website lives within a secure container with guaranteed server resources: memory, disk space, CPU cores, etc.

You don’t have to share any of it with others.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Pros And Cons Of VPS Hosting

A virtual private server provides dedicated resources and greater control over server configuration compared to shared hosting, at a lower cost than dedicated hosting. VPS strikes an optimal balance of affordability, customization, and guaranteed performance for many growing websites and web applications.

Pros of using a VPS server:

  • Cost-effectiveness: VPS costs less than dedicated hosting but delivers better performance than shared hosting. VPS is a budget-friendly option for sites outgrowing shared servers.
  • Customization and control: VPS users can fully optimize and customize server settings, and install software. This level of control is ideal for sites with specific configuration needs.
  • Scalability: It’s easy to scale VPS resources like CPU cores, RAM, and storage as site traffic increases. Sites can upgrade their VPS plan as needed to accommodate growth.
  • Dedicated resources: VPS provides guaranteed CPU, RAM, bandwidth, and disk space. Resources are not shared, ensuring full control and reliable performance.
DreamHost Glossary

Bandwidth

Bandwidth refers to the maximum amount of data that can be transferred via an internet connection within a specific path and during a specific time. Bandwidth is usually expressed in Megabits per second (Mbps or Mb/s).

Read More
  • Enhanced security: VPS isolates sites from one another for added security compared to shared hosting’s open environment.
  • Support and maintenance: Many VPS plans include technical support and management options to maintain the server.

Cons of using a VPS server:

  • Technical expertise required: Managing and optimizing a VPS requires strong technical skills. Those without server admin experience may struggle.
  • Resource allocation problems: Improper resource allocation by the hosting provider can impact VPS performance.
  • Limited hardware control: Users don’t control the physical server since VPS virtualizes hardware.

How VPS Compares With Shared Hosting & Dedicated Hosting

Shared Hosting vs VPS vs Dedicated Hosting

When selecting a web hosting plan, there are three main options: shared hosting, dedicated hosting, and VPS hosting. Let’s examine the key differences between shared, dedicated, and VPS hosting.

Shared Hosting

Shared hosting is the most common and the most cost-effective form of web hosting and works well for most new website owners. When you purchase a shared hosting plan, you’re sharing resources like CPU, RAM, and hard drive space with other website owners on that same server.

Consider shared hosting as multiple websites renting a single apartment in the same building. Each of you gets your own private bed, but you share the apartment with common spaces like the lobby, elevators, and utilities. In the case of websites, it’s CPU, RAM, and storage.

This offers multiple benefits, including lower costs, as the server costs are split among all the website owners. If one of the websites on your shared server has a huge spike in traffic, that could affect your website’s performance as well.

But when you’re just getting started, you are unlikely to notice the impact—and if you need help starting out, you may want to read this web hosting guide.

Dedicated Hosting

Dedicated hosting allocates an entire server to just your site. You have full control over resources and can customize them to meet your needs.

With dedicated hosting, you are no longer pooling resources (and sharing the costs) with other website owners.

Sounds great, right? The catch is that it’s much more expensive — but you get 100% control over your resources and can customize the software to meet your individual needs.

This type of hosting package is best for websites with robust technical demands. Some examples where dedicated hosting could be beneficial:

  • Websites with high-traffic volume
  • Sites handling large financial transactions
  • Custom software requirements
  • Need for specific operating system

Dedicated hosting is the optimal solution for sites that demand unparalleled performance and specificity.

VPS Hosting

VPS hosting provides a middle ground between shared and dedicated. When you choose VPS, other websites will be hosted on the same hardware as yours (remember that powerful server we talked about earlier?)

But now, your website is running on a virtual machine with its own dedicated resources. That means you get your own operating system, dedicated storage, powerful CPU, scalable RAM, and unlimited bandwidth.

Thinking of it from the apartment complex analogy, consider all apartment owners now have access to their private lobbies, elevators, and utilities. One person using the resource no longer impacts the rest.

This provides you with the double benefits of dedicated hosting, where you have complete control over the resources and lower costs because of the shared physical servers.

When Should You Switch To VPS?

When Should You Switch To VPS

If your website is growing, you may wonder: should you upgrade to VPS? Here are eight key signs that can indicate you’re now ready to make the switch.

1. You’re Worried About Security

Shared hosting offers basic security, but VPS delivers if you need more advanced features like firewalls, SSL certificates, or daily backups. This is particularly true for sites that process payments or store sensitive data. VPS gives you top-notch security features for the complete safety of your website.

DreamHost Glossary

SSL/TLS

SSL stands for Secure Sockets Layer. In short, it’s a protocol for maintaining a secure connection and protecting sensitive data. Transport Layer Security (TLS) is the successor to SSL. It is a cryptographic protocol that provides a safe connection over any given computer network.

Read More

2. You Start To Experience High Traffic Volume

Shared hosting is great when you’re just starting out and have a low visitor count, but it can struggle and slow down when your site has large spikes in traffic. With VPS, you get dedicated resources (CPU, RAM, bandwidth, etc.) that can smoothly handle those traffic swells.

3. Your Website Is Consistently Running Slowly

On shared servers, you’re fighting for resources with other sites. As you add more content over time, you can max out limits for things like RAM. Suddenly, pages take forever to load.

A VPS gives you plenty of room to continue scaling your business without frustratingly slow load times.

4. You Have An Online Store

The moment you plan on running an online store is the moment you should upgrade your hosting plan.

Why?

Because with VPS, you have a secure and dedicated virtual server where you are more likely to pass a PCI compliance test. The Payment Card Industry Data Security Standard was established by major credit card brands to protect against cardholder data theft.

If you are accepting credit cards on your website via a payment gateway, you want to do everything you can to ensure the safety of your consumers’ financial information.

How Payment Gateways Work

Since VPS is more secure than shared hosting, it’s the better option for e-commerce websites.

5. You Need To Install Custom Software

Shared hosting is great for website owners building their site with WordPress or other Content Management Systems. However, suppose you reach the point where you need to install custom software, engage in any other advanced programming, or use a custom server configuration. In that case, you’ll want a hosting option that affords you more control.

Similarly, several standard tax, billing, bookkeeping, and other integrative programs require around-the-clock server availability as well as high-speed internet. You’ll need a VPS or a dedicated hosting account to run these applications successfully.

If you operate on a shared server, you’ll only be frustrated when you learn advanced actions are forbidden, or that apps don’t have the support to function properly. Instead of dealing with this potential problem, upgrade to VPS hosting and immediately gain more control over your programming actions.

6. You Run Into Server Errors

Do you often see 503 or internal server errors?

It’s highly likely your customers see those, too. These errors generally indicate that your server is experiencing difficulties serving the website.

While you can troubleshoot downtime issues, every minute of downtime costs money for your online business. Instead, upgrading your resources usually offers better time-to-value for your business.

7. You’re On A Budget

While it’s true that a dedicated hosting package can address many of the problems on this list, it’s important to remember that a dedicated plan is a much pricier option. If you need to improve your bandwidth, increase your security, and get more RAM, then the most affordable option is to opt for VPS hosting.

8. You Build Websites For Your Clients

Shared hosting can be great for building personal or portfolio websites. It’s simpler to manage and offers lower costs. But when handling client sites, you do not want a slow server to impact them.

VPS hosting provides you with high-powered servers so you can host unlimited websites without worrying about performance.

How To Choose The Best VPS Hosting Plan For Your Website?

Now, let’s understand how you can find the best web hosting provider and the perfect VPS hosting plan for your needs. Before you begin, you need to pick between self-managed and managed VPS servers.

Self-Managed Vs. Managed VPS Services

When selecting a VPS hosting, you will usually be presented with two options:

  1. Self-managed VPS service (sometimes called unmanaged VPS)
  2. Managed VPS service

With self-managed VPSs, you need to understand server administration, troubleshooting software, and managing apps and services installed on your VPS.

Managed VPSs, on the other hand, are an excellent choice when you are unfamiliar with these admin skills or you just want your hosting company to handle it for you.

All of DreamHost’s VPS plans are fully managed, meaning you can skip worrying about the intricate technical details and focus on what really matters: creating great content for your website.

If you’re looking for root access, consider opting for DreamHost’s cloud hosting.

Now, let’s understand other options you’ll be faced with when picking a VPS server.

Operating System

Most VPS hosts offer Linux-based operating systems. This could include Ubuntu, Debian, CentOS, or Red Hat Linux.

DreamHost Glossary

Linux

Linux refers to a collection of open-source Operating Systems (OS). There’s no single Linux OS. Instead, users can choose from a broad group of Linux distros, all of which provide different experiences.

Read More

The reason? Linux is open-source, stable, secure, and flexible.

Windows VPS exists but is less common. You likely only need Windows if you use Windows-specific software. Linux VPS offers the most reliability, which is why most hosting providers only offer Linux VPS.

DreamHost Glossary

Open Source

In software development, open source projects are free for anyone to download, use, modify, and distribute. WordPress is one great example of open source software, although it’s far from the only one.

Read More

Reliability and Uptime

Your VPS host should guarantee an uptime of 99.5% or higher in their SLA. Anything less could result in unacceptable downtime and impact your business. Preferably, look for hosting providers that offer 100% uptime guarantees, load balancing, redundancy, and failover to deliver maximum reliability.

DreamHost Glossary

SLA

A Service-Level Agreement (SLA) is a contract between a service provider and a client. It covers various aspects of the service, including availability, quality, and responsibilities.

Read More

Hardware and Resources

Select a VPS host using modern hardware for optimal performance—SSD storage, abundant RAM and bandwidth, multi-core processors, etc. Scalability is also important to allow seamless upgrading of resources as your site grows. Make sure the VPS specs match your site’s resource needs.

24/7 Customer Support

Even with managed services, website issues can occur unexpectedly. Ensure your VPS provider offers 24/7 customer support via phone, chat, and support ticketing in case you need immediate assistance. Prompt support is crucial for minimizing downtime.

Backup Service

Choose a host that includes automated daily or weekly backups to prevent data loss. Managed hosting providers generally handle backups in the background without any effort on your part. However, remember that you still need to check with the support on your backups’ frequency and retention period.

Generally speaking, the more frequently your website changes (like a community website where many people post every day), the more frequent your backups need to be.

Ready for Your Own VPS Hosting?

If you made it this far—congratulations! You now understand VPS hosting and how it can benefit your fast-growing website!

You’re now ready to make the smart choice of upgrading to a VPS hosting—so you have the right resources and control to reach the next level, without breaking the bank.

If you haven’t finalized a VPS hosting provider yet, try DreamHost’s Managed VPS Hosting. It offers all the benefits you’d need from a complete VPS hosting provider, along with a 100% uptime guarantee. Talk to our support team and find out how our professional team can help you with site management, marketing, and more.

Ad background image

We Know You've Got Lots of VPS Options

Here’s how DreamHost’s VPS offering stands apart: 24/7 customer support, an intuitive panel, scalable RAM, unlimited bandwidth, unlimited hosting domains, and SSD storage.

Change Your VPS Plan

The post What Is VPS? A Beginner’s Guide to Virtual Private Servers appeared first on Website Guides, Tips & Knowledge.

]]>
How to Fix the ERR_CONNECTION_TIMED_OUT Error https://www.dreamhost.com/blog/err-connection-timed-out/ Thu, 19 Oct 2023 14:00:38 +0000 https://dhblog.dream.press/blog/?p=42119 In today’s lightning-fast, digital world, there’s nothing more frustrating than trying to visit a website, watching the loading bar creep slowly across the page… and then getting an error message instead of the site you expected. When this happens, a lot of times it’s the “ERR_CONNECTION_TIMED_OUT” error. This is a common error that has a […]

The post How to Fix the ERR_CONNECTION_TIMED_OUT Error appeared first on Website Guides, Tips & Knowledge.

]]>
In today’s lightning-fast, digital world, there’s nothing more frustrating than trying to visit a website, watching the loading bar creep slowly across the page… and then getting an error message instead of the site you expected.

When this happens, a lot of times it’s the “ERR_CONNECTION_TIMED_OUT” error. This is a common error that has a lot of potential causes, which means it can be frustrating for site administrators to diagnose and solve. Luckily though, most of the steps required to troubleshoot it are straightforward, even for beginners.

So if you’re staring down a Connection Timed Out error, you’re in the right place. Read on to learn more about what causes this common error and, more importantly, how to fix it on your site.

What Is The ERR_CONNECTION_TIMED_OUT Error?

What Is The ERR_CONNECTION_TIMED_OUT Error

The ERR_CONNECTION_TIMED_OUT error is a message you might see in your web browser. It means that a web page or resource you’re trying to reach took too long to respond, so the connection attempt was terminated due to a timeout.

This is a shockingly common error, though it presents different ways in different web browsers. The error will probably say some variation of, “This site can’t be reached.”

In a Google Chrome browser, it’s called an ERR_CONNECTION_TIMED_OUT error.

In Safari, it displays as “Safari Can’t Open the Page.”

If you use Mozilla Firefox and encounter this error, you’ll see, “The connection has timed out.”

And if you use Microsoft Edge, the error will read, “Hmmm… can’t reach this page.”

What Causes The ERR_CONNECTION_TIMED_OUT Error?

One of the really tricky (and potentially frustrating) things about getting an ERR_CONNECTION_TIMED_OUT error on your site is that it has a ton of potential causes. These errors can be caused by:

1. Network issues: Problems with your local network, such as unstable Wi-Fi or a poor Internet connection, can prevent your browser from connecting to a server in time.

2. Firewall or security software: Sometimes, firewall settings or security software might block a connection or cause delays, leading to timeouts.

3. Browser issues: Occasionally, cached data or cookies might cause connection problems. In these cases, clearing browser cache and cookies might help.

4. DNS issues: The Domain Name System (DNS) translates domain names (like www.example.com) into IP addresses. If there’s an issue with the DNS server your device is using, it might prevent you from accessing certain websites.

DreamHost Glossary

DNS

The Domain Name System (DNS) protocol keeps records of which domain names correspond to specific IP addresses. This system enables you to browse the web by typing in regular URLs instead of IP addresses.

Read More

5. Server-side issues: The server where the website is hosted might be experiencing high traffic, it could be down, or there might be other technical issues preventing it from responding in a timely manner.

How To Fix ERR_CONNECTION_TIMED_OUT Errors: Step By Step

Ready to solve your ERR_CONNECTION_TIMED_OUT error?

We’ll start by troubleshooting this error at the network, browser, and software level.

Then, we’ll explore some DNS fixes.

If those don’t work, we’ll go through some steps you can take to change the configuration of your WordPress site or server to finally banish ERR_CONNECTION_TIMED_OUT errors for good.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Troubleshooting At The Network, Browser, And Software Level

We’ll start with the easiest fixes first.

Step 1: Check Your Network Connection

Sometimes, when you get a Connection Timed Out error, it’s for a very straightforward reason: connection issues.

If you’re at home, check your router and reset it if necessary. To completely power cycle it, disconnect the power supply and wait at least 30 seconds before you plug it back in.

If you’re somewhere where you don’t have access to the router, like a coffee shop, visit another site or run an internet speed test to check the connection.

Step 2: Disable Firewall And Antivirus Software (Temporarily)

DreamHost Glossary

Firewall

A firewall is a set of rules that governs incoming and outgoing connections for a network or a specific device. The goal of firewalls is to protect against intrusions and unwanted outgoing connections.

Read More

While your firewalls and antivirus programs are meant to protect your computer from harmful websites and programs, they can get a little, shall we say, overzealous. Even the most popular antivirus software has been known to block perfectly safe websites from time to time, which is why the next step should be to (temporarily) switch off your firewalls and antivirus software and then try accessing your site again to see if it’s getting blocked.

Of course, only do this if you’re absolutely sure the site you’re trying to access is safe.

If it turns out this is the problem, you can submit a “false positive” report to the antivirus software that’s blocking your site to let the developer know they’re keeping users away from a site that’s actually safe. They should review your report and help resolve the issue.

Step 3: Disable Proxy Settings Or VPN

Proxy servers and VPNs work kind of like an internet middleman, redirecting the flow of information between your device and the website you’re visiting to help protect your IP address. However, depending on your VPN or proxy settings, they can also control which sites are accessible, which can result in accidentally blocking certain pages and getting a Connection Timed Out error.

If you’re using a VPN, you can either change the protocol or turn it off temporarily. If you’re using a proxy server, you’ll need to change the settings – and how you do that depends on your operating system.

For Windows 10: Open the Control Panel and select Internet Options. This will open the Internet Properties windows. Go to the Connections tab, then LAN Settings. Uncheck all the proxy settings and click OK.

Windows 10 LAN settings

For MacOS: Open System Preferences, go to Network, and click Advanced. Under the Proxies tab, uncheck all the boxes and click OK.

Mac proxies settings

Step 4: Clear Browsing Data

Your web browser stores certain information, including browsing history, login data, cookies, and more. Having browser data saved means when you revisit a web page, it can load faster. When cached data is out of date, it can cause loading problems and lead to errors, which is why it’s a good idea to clear your cache periodically.

The exact steps for doing so vary by browser, but it’s pretty straightforward – if you aren’t sure how, a quick Google search for your browser and “clear cache” should pull up a tutorial.

Troubleshooting At The DNS Level

If none of the above troubleshooting steps worked, it’s time to get a bit more technical. The next few steps will explore solutions to Connection Timed Out errors that have to do with DNS errors.

Step 1: Change DNS Servers

The first thing to try is changing your DNS servers. By default, DNS servers are automatically assigned by your internet service provider (ISP), but these default servers don’t always provide the best performance. You can try changing them to a free, third-party server, like the ones provided by Google or Cloudflare.

Once again, how you do this depends on your operating system.

For Windows 10:

  • Open the Control Panel and select Network and Sharing Center. 
  • At the top left, click Change adapter settings. Right-click on the current connection and select Properties.
  • Choose whether to use IPv4 or IPv6 addresses for your DNS settings. Then click Properties.
Windows Network Connections
  • Select the option to “Use the following DNS server addresses:”
  • Type in the IP address with the following:
    • Google DNS: 
      • For IPv4, use 8.8.8.8 and 8.8.8.4
      • For IPv6, use 2001:4860:4860::8888 and 2001:4860:4860::8844
    • Cloudflare DNS:
      • For IPv4, use 1.1.1.1 and 1.0.0.1
      • For IPv6, use 2606:4700:4700::1111 and 2606:4700:4700::1001
  • Click OK, then close and restart your browser.
Windows IP address

For MacOS:

  • Open System Preferences, go to Network, and click Advanced.
  • On the DNS tab, click the Plus sign in the DNS Servers section. Type in each IP address:
    • Google DNS:
      • For IPv4, use 8.8.8.8 and 8.8.8.4
      • For IPv6, use 2001:4860:4860::8888 and 2001:4860:4860::8844
    • Cloudflare DNS:
      • For IPv4, use 1.1.1.1 and 1.0.0.1
      • For IPv6, use 2606:4700:4700::1111 and 2606:4700:4700::1001
  • Click OK.
Mac DNS settings

Step 2: Flush DNS

Similar to your browser, your computer keeps a cache of information about the IP addresses of websites you visit, so it doesn’t need to start from the beginning to translate their domains each time you revisit a site. Also, similar to your browser cache, your DNS cache can become outdated and cause errors, so the next troubleshooting step is to flush it.

If you’re using Windows, you can do this using Command Prompt. Press the Windows key + R to activate the Run command, then type “cmd” into the dialog box and click OK. In the Command Prompt window, enter the following:

ipconfig /flushdns

Then, press enter. If it worked, you should see a message that says, “Successfully flushed the DNS resolver Cache.”

If you’re on Mac, open the Terminal application and insert the following command:

dscacheutil -flushcache

Note that there’s no success message on Mac.

Step 3: Check Your Hosts File

Your hosts file is where your computer stores a sort of map between IP addresses and their corresponding domain names. However, it may also include a list of blocked websites, and if the site you’re trying to access is blacklisted in your hosts file, that will cause the Connection Timed Out error.

On Windows, you’ll need to set up additional access with a text editor, like Notepad, to view the Windows hosts file. From the start menu, find Notepad, right-click on it, and select Run as administrator. Then, from your text editor, navigate to File → Open and put the path below into the File name bar:

C:\Windows\System32\drivers\etc\

Windows Host Files

Select the hosts file. The list of blocked sites will be below the last line that starts with the “#” sign. Delete them and save your changes.

Windows Host Notepad

On Mac, open the Terminal, insert the line below, and hit enter:

sudo nano /private/etc/hosts

Remove all the websites below the “::1” line.

Mac Host Files

Troubleshooting At The WordPress Site Or Server Level

If none of the above fixes solved your Connection Timed Out error, it could be an issue with your WordPress site or server. Below are some of the most common server-side issues and how to troubleshoot them.

Step 1: Temporarily Disable Plugins

WordPress plugins are a great way to expand your site’s functionality, but they can also be problematic, especially if they come from an unreliable source or if you install more plugins than your site can handle.

DreamHost Glossary

Plugin

WordPress plugins are add-ons that enable you to extend the Content Management System’s (CMS) functionality. You can use plugins for almost everything, from adding e-commerce features to WordPress to implementing page builders or using Search Engine Optimization (SEO) tools.

Read More

That’s why temporarily disabling plugins is a great first step if you believe a Connection Timed Out error is originating from an issue with your site. If you recently installed any new plugins that you suspect could be the cause, start there.

However, if you’re unable to load your site, that typically also means you can’t access your WordPress admin area. That means you’ll need to access your site using SFTP. We recommend using FileZilla, since it’s free and open source. Once you’ve connected to your site, you’ll need to find your wp-content directory, and inside it, a folder called plugins. Change the name of the plugins folder to something like plugins-discontinued (make sure you remember the name so you can find it later). Reload your site. If you no longer get the Connection Timed Out error, you now know one of your plugins was the culprit. You just need to find out which one.

To do so, head back to SFTP and rename the plugins folder back to its old name. Inside the folder, you’ll see a folder for each individual plugin. Do the same thing, but this time, rename each individual plugin’s folder, then try to reload your site. This will isolate the exact plugin that’s causing the error.

DreamHost Glossary

SFTP

Secure File Transfer Protocol (SFTP) is a safer version of the FTP protocol that uses a secure shell data stream.

Read More

Step 2: Check The Maximum Execution Time

Maximum execution time is the total duration a php script can run on a site before it times out. If your site is reaching its maximum execution time before it can fully load, that could be the cause of your Connection Timed Out error.

DreamHost Glossary

PHP

PHP (Hypertext Preprocessor) is an open-source scripting language. It’s widely used in web development and can be embedded in HTML. Several popular Content Management Systems (CMS), such as WordPress, are built with PHP.

Read More

On most sites, this is set to 30 seconds as a default. However, you can increase it. You have a few options here, but they depend on how your hosting provider has set up their servers:

  • Find the php.ini file in your home directory, then find the max_execution_time parameter within it and increase it.
  • Edit your .htaccess file to include php_value max_execution_time set to your preferred value.
  • Reach out to your hosting provider and ask them to increase your maximum execution time.

Step 3: Increase Your PHP Memory Limit

PHP allows a default amount of memory to be used when processing a website. Some sites need more than that, which could be the cause of the Connection Timed Out error you’ve been seeing. In this case, increasing your PHP memory limit would be the solution.

You’ll need to access your site via SFTP to increase your PHP memory limit. Access your site’s directory, then find the wp-config.php file. Edit the wp-config.php file to include the following lines before the wp-settings.php inclusion:

define( 'WP_MEMORY_LIMIT', '300M' );
define( 'WP_MAX_MEMORY_LIMIT', '300M' );

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

Keep in mind that you can’t increase your site’s PHP memory infinitely. If you try to increase it too much, you may receive an error telling you that you’ve reached its limit. If this happens and you still need more memory, you may need to upgrade your hosting plan.

Step 4: Revert To The Default Theme

If you’ve ruled out plugins, execution time, and PHP memory limits, the next place to look is your WordPress theme. Similar to plugins, themes can break or cause compatibility issues with websites, which could be the cause of a Connection Timed Out error.

To check if your theme is causing problems, connect to your site through SFTP and revert to the default theme. Then, reload your site to see if the error is still there.

Step 5: Upgrade Your Hosting Plan

If you’ve tried all the troubleshooting steps above and you’re still getting an ERR_CONNECTION_TIMED_OUT error, it’s time to reach out to your hosting provider. They can help you troubleshoot the issue more deeply and look for less common problems that might take more specialized expertise to solve.

In some cases, this error might even just mean it’s time to upgrade your hosting plan. For example, if you use shared hosting, another site could be hogging your server’s resources. Another potential cause? Your site may have simply exceeded its maximum allowed bandwidth.

DreamHost Glossary

Shared Hosting

Shared hosting is a web hosting plan in which multiple websites share the same server. This is typically the most affordable hosting plan, as the expense of server maintenance is distributed among multiple consumers.

Read More

A higher-tier hosting plan can help your site avoid slowdowns and downtime since it will dedicate more server resources directly to your site. It will also ensure that your site isn’t affected when other sites have traffic surges.

Ready to explore better hosting plans? DreamPress offers reliable, lightning-fast hosting solutions specifically optimized for WordPress – plus free migration for existing WordPress sites.

ERR_CONNECTION_TIMED_OUT Error FAQs

What Does The ERR_CONNECTION_TIMED_OUT Error Mean?

Getting this error indicates that a requested web page or resource took too long to respond, leading the browser to terminate the connection attempt due to a timeout.

Is The Error A Problem With My Device Or The Website I’m Trying To Visit?

It could be either. The error could be due to server-side issues, but it could also be a result of issues with your network, browser, firewall, DNS, or other client-side problems.

Does This Error Compromise My Security?

The ERR_CONNECTION_TIMED_OUT error itself doesn’t compromise your security. Still, it’s always a good idea to ensure that your browser, OS, and security software are up-to-date to protect against potential threats.

Can VPNs Cause This Error?

Yes, sometimes a VPN might cause connection issues. If you’re using a VPN and encounter this error, try disconnecting from the VPN and accessing the site again to see if that resolves the issue.

The Website I’m Trying To Access Works For Others But Not For Me. Why?

This suggests that the issue might be on your end. It could be due to localized network problems, your ISP, specific settings on your computer, or other client-side factors.

How Long Should I Wait Before Trying To Access The Website Again?

If it’s a server-side issue, it’s hard to say. You can wait a few minutes and try again. If you really need to access the site right away, you should consider reaching out to the site’s administrator or support for more information.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

The post How to Fix the ERR_CONNECTION_TIMED_OUT Error appeared first on Website Guides, Tips & Knowledge.

]]>
The Ultimate Guide To Web Hosting (What You Need To Know) https://www.dreamhost.com/blog/web-hosting-guide/ Thu, 07 Sep 2023 14:00:09 +0000 https://dhblog.dream.press/blog/?p=41664 What makes a great website? Design, content, and features are all part of the mix, but the truth is that no one would be able to access your site without web hosting. For many site owners, hosting is a bit of a mystery. With so many different plans and providers to choose from, knowing where […]

The post The Ultimate Guide To Web Hosting (What You Need To Know) appeared first on Website Guides, Tips & Knowledge.

]]>
What makes a great website? Design, content, and features are all part of the mix, but the truth is that no one would be able to access your site without web hosting.

For many site owners, hosting is a bit of a mystery. With so many different plans and providers to choose from, knowing where to start is half the battle.

To help you figure out what hosting is all about and find the right option for your next project, we decided to build the ultimate guide. Spend the next few minutes with us, and you’re guaranteed to come away with a wealth of knowledge!

What Is Web Hosting?

Every website is stored on a server. That server makes the website available to users on the web. Web hosting is the service of storing (aka hosting) a website on a server.

DreamHost Glossary

Server

A server is a computer that stores data. A web server is a type of server that stores and delivers web pages to users. Web servers are connected to the internet and use HTTP to send web pages to users who request them.

Read More

Your “web host” or “hosting provider” is the company that owns and maintains the web server that hosts your site. In addition, these companies often provide helpful resources, support, and services like domain registration and custom email addresses.

Selecting the right web hosting services for your site is an important process. Your choice can impact your website’s security, availability, and performance. Picking the wrong plan or web host could affect the growth of your website and your ability to attract repeat visitors.

Ideally, you’ll want to use a hosting plan that fits your needs and budget.

If you’ve never had to sign up for hosting before, the sheer range of available services can seem a little intimidating.

To help you make an informed choice, let’s take a closer look at the most common types of hosting:

Shared Hosting

Shared Hosting

Shared hosting plans are the most popular choice among website owners. On this type of plan, a single server is shared between multiple users. That means a single computer will host a whole heap of websites.

DreamHost Glossary

Shared Hosting

Shared hosting is a web hosting plan in which multiple websites share the same server. This is typically the most affordable hosting plan, as the expense of server maintenance is distributed among multiple consumers.

Read More

Although you share resources with other users, they don’t have access to your files, information, or other data. The major upside to shared plans is that they tend to be very affordable since web hosting companies can divide server upkeep costs among multiple users.

Think of it like having a timeshare on an exotic island. You get the benefit of a beautiful place to relax and some general upkeep, but you don’t have exclusive ownership.

  • Performance And Security: Good loading times for smaller sites, up to 1,000 visitors per day. Shared hosting is generally secure, but issues can be shared between sites on the same server.
  • Service And Features: All basic services are included, but you will need to install your own software and take some responsibility for performance and security optimization.
  • Pricing: The industry standard for shared hosting is around $5 per month. That said, you can find good plans for less.

At DreamHost, we offer high-value shared hosting plans starting at just $2.59 per month, including free domain registration.

Pros Of Shared Hosting:

  • It’s easy to find plans for less than $5 per month.
  • Depending on your service provider, you can get excellent performance on medium or small business websites.

Cons Of Shared Hosting:

  • Shared plans often don’t perform well for websites with heavy traffic.
  • For the best rates, you may have to sign up for a multi-year contract.

Who Is Shared Hosting Best For:

For a beginner, shared hosting should be the go-to option. With the right provider, you’ll have all the tools you need for getting your project going and plenty of room to scale up over time.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Virtual Private Server (VPS) Hosting

Virtual Private Server

Virtual Private Servers (VPS) offer enhanced performance and greater customization compared to shared hosting plans. In a VPS environment, a single physical server hosts multiple isolated units, each dedicated to individual websites.

So, if shared hosting is a timeshare property, VPS hosting is like having your own apartment in a large complex.  In practical terms, VPSs provide a higher degree of isolation between users, although you still share the same physical server.

Nevertheless, this setup can enhance performance and security. Plus, depending on your hosting provider, you might be able to configure your VPS from scratch and get precisely the resources you need.

To give you an idea of what you’re looking for, a single-core VPS with 1 GB of RAM is enough to run a simple WordPress website. However, figuring out the precise amount of resources you need for each new project can be tricky. This might make a VPS a less attractive option if you are new to website hosting.

  • Performance And Security:  VPS hosting guarantees better page-loading speeds and less downtime. Since each site is kept separate, security threats are rarely shared.
  • Service And Features: Unmanaged VPS hosting is a lot like shared hosting. Managed VPS hosting takes care of all technical tasks.
  • Pricing: Highly variable, but the monthly industry standard is right around $30 per month. Managed plans cost a bit more than unmanaged plans, although they make up for it with additional features and services.

At DreamHost, we offer four tiers of VPS hosting, each with a monthly, one-year, and three-year option.

Pros Of VPS Hosting:

  • You get fully dedicated resources for your website.
  • Depending on your host, you might be able to configure your VPS to your specific needs.

Cons Of VPS Hosting:

  • Calculating the amount of resources you need can be challenging.
  • Configuring a VPS often requires some technical know-how.

Who VPS Hosting Is Best For:

If you want full control over your server without spending hundreds of dollars on a dedicated plan, consider using a VPS. The high level of customizability also makes it an attractive option.

Dedicated Hosting

Dedicated Hosting

So far, we’ve only discussed hosting plans where you share servers with other users. Servers are expensive, so if you want a private one all to yourself, you’ll pay more of a premium.

DreamHost Glossary

Dedicated Hosting

Dedicated hosting uses a server dedicated to a single customer. The client has complete control over the server, and they are responsible for all of its maintenance and administration.

Read More

With a dedicated server, you get exclusive access to a single server (or sometimes more than one). That means you’ll have complete control over its configuration, and the web hosting provider simply houses it for you.

Carrying on the analogy — instead of a timeshare, you get the whole place to yourself.

  • Performance And Security: Optimum speed, stability, and security for high-traffic websites. The best performance comes from plans that use SSD (solid state drive) storage.
  • Service And Features: Unmanaged dedicated hosting means it’s up to you to add features. Managed dedicated hosting provides the same kind of service we talked about when discussing VPS hosting plans, plus features like a unique IP address, dedicated server backups, and extra support.
  • Pricing: The average dedicated server starts at around $100 per month, although plans at that price aren’t likely to include a fully managed hosting package.

Our own dedicated hosting is managed and still comes in at a competitive price. The month-to-month price range for DreamHost’s dedicated hosting starts at $169.

If you’re not afraid of commitment, you can bag a standard plan starting at $149/month or pay $279/month for enhanced features such as additional memory and faster processing.

Pros Of Dedicated Hosting:

  • You get a whole server to yourself.
  • In most situations, you can configure your server to your liking.
  • DreamHost users get uncapped bandwidth.

Cons Of Dedicated Hosting:

  • It’s a relatively expensive option.

Who Dedicated Hosting Is Best For:

Dedicated hosting is the go-to choice for websites that require the very best when it comes to performance and have the budget for it.

Alternative Hosting Types

The three web hosting options above cover the majority of websites. However, there are more types of hosting available. Here are some of the alternative options to look out for:

Cloud Hosting

Cloud Hosting

Cloud hosting is where things begin to look a little trickier. When people talk about the “cloud,” they’re usually referring to a distributed VPS.

DreamHost Glossary

Cloud Hosting

Traditional web hosting houses a website on a physical server. On the other hand, ‘cloud hosting’ uses multiple virtual (remote) servers for the same task.

Read More

The advantage of this setup is that you can easily scale your server’s resources as needed. Plus, thanks to the system’s built-in redundancy, you won’t have to worry about downtime and data loss.

Cloud hosting can be either very cheap or incredibly expensive, depending on your server configuration. It’s the type of setup that some massive internet-based companies use to power their operations. But unless your website is called Netflix, you probably won’t need this option.

Pros Of Cloud Hosting:

  • It offers a high degree of scalability.
  • You can customize your server as you see fit.

Cons Of Cloud Hosting:

  • The payment structures for cloud hosting can be complicated.
  • It’s not well suited to users who don’t have experience with configuring a server.

Who Cloud Hosting Is Best For:

If you like tinkering with your server’s configuration and want a high degree of scalability, cloud hosting is worth looking into.

Managed WordPress Hosting

Managed WordPress Hosting

Managed WordPress hosting is a little different from the other options here. It’s not a type of plan but rather a kind of service.

With managed WordPress hosting, your provider takes care of a lot of the day-to-day maintenance tasks that would otherwise fall on your shoulders. Those tasks include backups, security monitoring, software updates, and more.

Managed hosting plans can come in every flavor; there are managed shared plans, managed VPSs, and even managed dedicated servers. In all of these cases, you pay a little extra, so you don’t need to worry about the nuts and bolts of hosting.

You don’t need a WordPress-specific plan to set up a website with the platform. However, these plans tend to be optimized to provide better performance and make your life much simpler.

On top of WordPress-specific plans, there are also entire hosting platforms that only work with this Content Management System (CMS).

DreamHost Glossary

Content Management System (CMS)

A Content Management System (CMS) is a software or application that provides a user-friendly interface for you to design, create, manage, and publish content.

Read More

Pros Of Managed WordPress Hosting:

  • It comes with some level of managed service.
  • You get access to WordPress-specific perks, such as free plugin licenses and one-click installations.

Cons Of Managed WordPress Hosting:

  • It’s only valuable for WordPress users and limits your ability to use other platforms.

Who Managed WordPress Hosting Is Best For:

You can set up WordPress on any type of web hosting plan. However, if you want a plan tailored to the CMS from the ground up, WordPress hosting can be an excellent investment.

Reseller Hosting

Reseller Hosting

If you run a business that revolves around building websites, such as a development or design agency, you’ll probably have to deal with hosting.

DreamHost Glossary

Reseller Hosting

Reseller hosting is when a web developer purchases hosting from a web host and then resells it to their own clients. The developer acts as a middleman between the host and their clients, often providing support and billing services.

Read More

A lot of clients don’t quite understand how hosting works and could use help getting everything set up and working. Reseller hosting offers a solution for these situations.

In a nutshell, you get access to an account that lets you provide hosting to your clients. Those clients pay you directly, and you’re responsible for managing their accounts.

Most web hosts that offer reseller accounts enable you to charge whatever you wish for hosting. This means that if you run a web development agency, you can transform hosting into a source of recurring revenue.

Pros Of Reseller Hosting:

  • You can set up hosting accounts for third-party users and charge them directly.
  • You’re in complete control of the hosting experience.

Cons Of Reseller Hosting:

  • You’re usually responsible for billing clients.
  • In most cases, you’ll have to take care of maintenance and support tasks independently.

Who Reseller Hosting Is Best For:

If you run a business that helps with web hosting for clients, it can make sense to offer that service in-house. With reseller hosting, you can bill clients directly for hosting and take care of maintenance for them while having another company provide the infrastructure.

How To Choose A Web Hosting Provider

Your choice of web hosting plan will inevitably impact your website, but remember, these are just services; your choice of provider is every bit as important.

Here are some key questions to answer when choosing a host:

Performance

Performance and uptime can make or break your website. Your website’s performance influences Search Engine Optimization (SEO), bounce and conversion rates, and how trustworthy your site appears to visitors. We’re not exaggerating when we say that your server’s reliability directly impacts your website’s bottom line.

Any provider you consider should have an uptime guarantee of at least 99%. Evaluate the host’s performance-related features, such as caching, SSD storage, and Content Delivery Service (CDN) access.

Don’t just rely on claims and reviews. Test the host’s performance using tools like Google’s PageSpeed Insights. If possible, you may even want to get access to a test account or sign up for a free trial, and use that to conduct further testing.

Software

Whether you’re building a personal blog or the next big tech startup, every website relies on certain technology. When you select a web hosting provider, check their technical documentation to ensure that the service supports the software, services, and languages that you plan to use.

For example, you will need a hosting solution that supports PHP and

MySQL or MariaDB if you want to run WordPress.

DreamHost Glossary

MySQL

MySQL is a relational database management system that offers practical management tools. You can use MySQL to create, modify, and extract data from relational databases through the SQL programming language. It can also control the access that users have to the database.

Read More

Top hosts offer easy installation for popular apps and user-friendly control panels for account management. DreamHost provides a one-click WordPress installer, WooCommerce pre-configured plans, and a built-in Website Builder for hassle-free website creation and management.

Security

According to Norton, over 800,000 sites are hacked every year. So, even for smaller websites, cybersecurity should be a top priority.

To give yourself the best possible protection from threats like malware and DDoS (distributed denial-of-service), choose a host that follows up-to-date security protocols and provides features for protecting your site.

Secure Socket Layer (SSL) certificates are particularly vital for keeping your site and users safe. Adding an SSL certificate to your site can be an additional expense, but some hosting providers (like DreamHost) will include one in your plan at no extra cost.

Another feature to look for is automatic daily backups. These ensure that you can always bring your site back if it becomes corrupted with malicious code, or you lose your content.

Scalability

Most new sites start on a shared, low-cost plan. However, as your online presence expands, you’ll need more resources, bandwidth, and disk space in order to maintain your site for all its users. A host that offers easy upgrades to a Virtual Private Server (VPS), Managed WordPress, or Dedicated Hosting plan can make this process smoother.

If you choose a host that makes it challenging to change your plan, you could find yourself migrating to a new provider just a few months after launching your site. This can ultimately be a waste of time and money.

Technical Support

Your relationship with your web host will hopefully be a long one. Reliable customer support is vital to a mutually beneficial relationship. Ensuring that your host has multiple contact methods and a 24/7 support team should guarantee that someone will be available whenever you need help.

Additionally, specific support for WordPress, e-commerce, or other niches can come in handy. Choosing a host with a knowledgeable team will ensure that your site has the best possible support.

For example, if you opt for DreamPress, our WordPress-specific managed hosting, you’ll get priority access to our elite squad of in-house WordPress experts.

Pricing

Obviously, your budget is a key consideration when selecting a web host. Shared hosting can cost as little as $3-10 per month to start. VPS plans are $20-50 per month, while dedicated servers range from $100 to over $500 per month.

Just remember that you might not be on the same plan forever. If you want to pick a host for the long term, consider what kind of resources you might need in future and check the pricing for plans that can cover your requirements.

On a similar note, make sure to look into your potential host’s renewal fees, as well as the initial sign-up costs.

If you need to cancel your hosting for any reason, you’ll also want to avoid excessive fees. It’s wise to choose a host that offers a free trial period and one that has a generous refund policy or money-back guarantee.

Other Features

Along with all the points mentioned above, it’s worth considering what other features each host offers.

For instance, do you get email accounts with your hosting plan? Can you dive into the file system of your website via Secure File Transfer Protocol (SFTP)? If you need to fix errors or optimize your site, does your host provide access to your .htaccess file?

DreamHost Glossary

.htaccess

’.htaccess’ is a configuration file used by the Apache web server software. The .htaccess file contains directives (instructions) that tell Apache how to behave for a particular website or directory.

Read More

All of these questions are worth considering as you make the final choice on your web hosting provider.

How To Set Up Your Website With Shared Hosting

So, you’ve weighed up the pros and cons, and decided on your web host. The next step is to set up your hosting plan.

The most common choice, particularly for new website owners, is shared hosting. To show you how it works, let’s walk through the process of setting up your site — from creating an account and choosing a plan to building and securing your website.

Step 1: Sign Up For Your Hosting Plan

The first step in bringing your website to the world is to sign up for a hosting plan. This task varies between hosts.

If you decide to host with us, simply head to the Shared Hosting page and click on the blue Sign Up Now button underneath the feature list of your preferred plan. You’ll be taken to a wizard that will walk you through purchasing your plan and creating a DreamHost account.

Sign Up Page

Simply follow the steps to get everything set up. You can opt to register a domain right away during the process or save that task for later. Which you choose is totally up to you. There’s no right or wrong way to do it.

The DreamHost account creation is on the third page (Secure Checkout). Below that, you’ll find additional options you can configure for your new site.

Sign up additional options
Sign up plan options

If you’re planning on using WordPress to build your site, we highly recommend checking the boxes to pre-install the platform and use the WP Site Builder. This can greatly streamline the process of getting your site up and running.

Step 2: Explore The Control Panel

Once you’ve created your account and purchased a hosting plan, you can log into your control panel using the email and password you provided during signup.

Dreamhost home

On DreamHost Shared Hosting plans, we make it pretty easy to control your site. Through the user panel, you can see everything related to your websites, domains, and hosting account in one dashboard.

Along the left side, you can find all the available features and functions:

  • Domains: This menu is where you’ll access your existing domains or register new ones.
  • WordPress: Here you can access any WordPress services you’ve added to your account, such as our DreamPress managed hosting. You can also add new installations of WordPress from this menu.
  • Mail: This menu provides you with everything you need to manage your email services.
  • Users: This is where you’ll find options for adding and managing additional users you’ve added to your account.
  • MySQL Databases: If you ever need to access your MySQL databases, you can use this option, found under the More menu.

There’s plenty more to explore in the panel, so we recommend taking a few minutes to click on the various links and get acquainted with where things are located.

Step 3: Register Your Domain

If you didn’t register your domain during the initial signup process, you should do so now. Your domain name gives your site its primary URL and carves out its unique place on the web. No one else can use your domain once you’ve registered it.

Our Shared Unlimited hosting plan includes a free domain registration credit. You have one month from signup to use the credit, so if you’re unsure what domain you want, you can take a little time to think about it. However, you can’t start building your website until your domain is registered.

To register a domain, head to your DreamHost panel and navigate to Domains > Manage Registrations.

Manage Registrations

From there, you can search for the domain you want. If it’s available, you can add it to your cart.

Your domain

Keep in mind that it can take up to 72 hours for your domain to become accessible once you purchase it. So if you’re in a hurry to get your site online, it’s best to take care of this task as soon as possible.

Step 4: Customize Your WordPress Site

With your domain registered, you can start building and customizing your WordPress site.

There are many ways to approach website design, of course. We highly recommend using our WP Site Builder tool, as it makes the process much more straightforward. If you didn’t enable this option when signing up, you can contact support any time to have it turned on.

The easiest way to access your WordPress dashboard and admin page is simply to navigate to yourwebsitename.com/wp-admin in your browser, where “yourwebsitename.com” is your site’s domain name. You can also access the dashboard by clicking the link in the email you received when setting up your account.

If you enabled the WP Site Builder, you’ll be greeted by a “getting started” wizard the first time you log into your dashboard. This wizard will walk you through three quick steps to begin building your site.

When you’re finished, you’ll land back in your dashboard, with a new item available in the menu: Inspirations. From there, you can edit your WP Site Builder theme and make other changes.

Step 5: Increase Security With An SSL/TLS Certificate

SSL (Secure Sockets Layer) and its successor, TLS (Transport Layer Security), are protocols that help enable secure data transmission online.

Sites using SSL/TLS have “https” in the URL, and most browsers display a padlock icon in the address bar to indicate that a site is using this security feature.

We offer a free SSL/TLS certificate for personal websites. E-commerce sites can take advantage of our partnered offer with Sectigo Verified SSL. No matter which offer you’re using, you’ll follow the same steps to add the certificate.

Open your DreamHost panel and navigate to Websites > Secure Certificates.

Secure credentials

From this screen, you can manage any existing certificates on your sites or add a new one by clicking the Add button. After that, simply follow the instructions provided.

Step 6: Set Up Your Email

Finally, we recommend setting up email on your domain. This gives you a simple and reliable way to communicate with website visitors and customers. Depending on your plan, email hosting might be included or available as a paid extra.

To access your email settings on your DreamHost plan, visit your user panel and click on Mail.

Email Menu

There you’ll find options for accessing your email, adding new email addresses, managing spam settings, and more. To set up email on your new domain, navigate to Manage Email > Create New Email Address and follow the instructions within.

Setting Up Managed Shared Hosting

Whereas shared hosting is very much a DIY option, managed hosting provides a hassle-free way to get your website online. With these plans, you don’t have to worry about site management and maintenance.

When you sign up for a managed hosting plan, your account should come with your chosen CMS or software pre-installed. For example, we offer managed plans for WordPress.

This means you only have to walk through the basic setup process for your software, and then you’re ready to go.

Once your site is online, your provider should take care of security updates and server optimization. Some hosts offer extra features, such as one-click staging. This allows you to test new plugins, add-ons, templates, and themes to make sure they work properly before deploying them on your live site.

Setting Up VPS Hosting 

The process of setting up a VPS varies, depending on the type of hosting you have chosen.

Some providers offer self-managed VPS hosting, which is much like owning your own server. This means you have plenty of control over the configuration of your VPS, but you will also be responsible for the technical side — such as deciding how much RAM and what CPUs you need.

In contrast, managed VPS plans work much like managed shared hosting. The primary difference is that you have dedicated space in your chosen data centers.

With DreamHost, managed VPS hosting is available as an add-on to a regular shared hosting account.

To set up your first VPS:

  1. In your User Panel, go to VPS under Add Product in the left-hand column
  2. Click the Add a VPS Server button
  3. On the Add VPS page, choose your preferred VPS package
  4. Use the on-screen options to decide whether to migrate data from your shared server to your VPS, and whether to cancel your current shared hosting
  5. Click the Get This VPS button to purchase your chosen plan

To set up additional virtual private servers, repeat the steps above, skipping number four.

Get Started Today With DreamHost

Solid web hosting is the foundation of any successful site. It allows you to deliver content and reach the maximum number of potential customers, without the constant fear of technical failure.

If you’re looking for a reliable hosting solution, DreamHost has you covered. Our hosting comes with a 100% uptime guarantee, market-leading performance, and excellent technical support.

We also offer a range of hosting plans at affordable prices: shared, managed, VPS, cloud hosting, and more. Sign up today to see how easy it can be to host a website online.

Ad background image

Web Hosting That Powers Your Purpose

We make sure your website is fast, secure and always up so your visitors trust you.

Choose Your Plan

The post The Ultimate Guide To Web Hosting (What You Need To Know) appeared first on Website Guides, Tips & Knowledge.

]]>
The 100 Best WordPress Plugins (Including New AI Tools) https://www.dreamhost.com/blog/best-wordpress-plugins/ Thu, 13 Jul 2023 14:00:54 +0000 https://dhblog.dream.press/blog/?p=41221 WordPress is by far the most popular system for managing websites. In part, this is because you can adapt the platform for any purpose using plugins. Whether you’re a budding blogger or an aspiring e-commerce entrepreneur, there’s a tool out there to match your needs. The only question is, which ones should you install? We […]

The post The 100 Best WordPress Plugins (Including New AI Tools) appeared first on Website Guides, Tips & Knowledge.

]]>
WordPress is by far the most popular system for managing websites. In part, this is because you can adapt the platform for any purpose using plugins. Whether you’re a budding blogger or an aspiring e-commerce entrepreneur, there’s a tool out there to match your needs.

The only question is, which ones should you install?

We created this epic guide to provide the answer. In the list below, we’re going to introduce the hundred best WordPress plugins known to humankind — including some exciting new entrants in the AI space.

The Best Website and Page Builder Plugins

There are thousands of great ready-made themes for WordPress, but if you want to make something truly unique, try working with these page builder plugins:

1) Essential Blocks

If you’re new to using page builders, Essential Blocks is a great starting point.

Designed to extend WordPress’ Gutenberg editor, this plugin gives you more than 40 pre-styled blocks to work with. Each block is customizable, and you can use them in both pages and posts. If that sounds like too much hard work, you can access 1,000 full-page templates through an add-on subscription.

Key Features:

  • Extends Gutenberg editor
  • Over 40 element blocks
  • Responsive designs and fast to load

Pricing: Free; Pro license with extra blocks is $49 per site

2) Elementor

If you’re just starting your website, you can benefit from using a page builder plugin such as Elementor. This tool has a drag-and-drop editor to design your website’s appearance on the front end. You can also import pre-designed pages, blocks, and templates to speed up the creation process, and get creative with animations and motion effects.

Key Features:

  • Over 40 free widgets
  • Performance improvements with reduced CSS and JavaScript files
  • Ready-to-go website kits and templates

Pricing: Free version with limited features; Elementor Pro starts at $59 per year

3) Beaver Builder

In comparison with many drag-and-drop page builders, Beaver Builder uses “clean” code that conforms to WordPress standards. This means your work will remain intact, even if you choose to remove the plugin later. You also get a good range of design elements to choose from, and a choice between visual and in-line editing.

Key Features: 

  • Drag-and-drop editor that leaves behind “clean” code
  • Responsive designs featuring over 30 elements
  • Excellent loading speeds for a page builder

Pricing: Free Lite version with limited features; Premium plans start at $99 per year.

4) Spectra

Designed to work in tandem with the Gutenberg editor, Spectra serves up over 20 full website templates that work with the free Astra WordPress theme. If you prefer to take control yourself, you have a generous supply of stylish blocks to play with. What’s more, this free tool works nicely with various other plugins, including WooCommerce.

Key Features:

  • Page builder plugin designed to extend Gutenberg
  • Over 20 pre-made site designs that can be installed with a click
  • Works with other plugins, including WooCommerce, LifterLMS, and more

Pricing: Free

5) Cornerstone

A relative newcomer, Cornerstone is a powerful theme builder that combines pre-styled elements with extensive options for design customization. Aimed at professionals and advanced WordPress users, this plugin offers an impressive array of tools, and it delivers excellent performance thanks to a lightweight codebase. Plus, it has great SEO features built in.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Key Features:

  • Theme builder with element library and conditional logic
  • Extensive design customization options
  • Lightweight plugin that delivers “clean” semantic code

Pricing: $69 one-time fee, or available in a yearly subscription

6) Themify Builder

With 60 pre-made layouts and the same number of animation effects, Themify Builder is a page builder with plenty to offer. This plugin delivers the usual drag-and-drop editing experience, with plenty of modules and custom styling options. It hasn’t quite received the same level of admiration as other builders in this roundup, but it’s still a solid, free option.

Key Features:

  • Drag-and-drop page builder with over 60 predesigned layouts
  • Customizable responsive styling and adjustable columns
  • Full revisions history

Pricing: Free

7) Otter Gutenberg Page Builder

Gutenberg is WordPress’ built-in editor for designing posts and pages. While it does have some pre-designed block patterns, it might have more limited functionality than you expect. Fortunately, the Otter Gutenberg Page Builder plugin extends the features of the Block Editor — without drastically slowing your load speeds.

Key Features:

  • Many block types, including the Maps Block, Product Review Block, About Author Block, and more
  • Over 50 different block templates
  • Built-in responsive settings to control color, animation, and typography

Pricing: Free, with the Premium version providing extra features from ~$52 per year.

8) Getwid by MotoPress

When it comes to keeping your site up to date and adding new content, Getwid by Motopress can give your workflow a needed boost. This drag-and-drop builder system extends WordPress’ native block editor, allowing you to create content using predefined elements. This can be a huge timesaver, especially if you frequently add and customize blog posts, pages, or other content types.

Key Features:

  • 40+ Gutenberg blocks to extend WordPress’ default library
  • 35+ pre-built block templates you can use to create pages quickly
  • Built-in toolset allows for quick editing of posts and pages

Pricing: Free basic version, which can be extended with premium add-ons. Get access to the full library of Motopress plugins with an annual membership, starting at $299 per year.

9) Responsive Menu

WordPress provides a flexible menu system out of the box. But if you’re looking for even more control, Responsive Menu lets you customize menus to your heart’s content. It serves up more than 150 options, covering text, fonts, colors, buttons, animations, background images, and custom logos.

Key Features:

  • Provides more than 150 menu options that can be customized to your liking
  • Lets you alter key elements of your menus, such as fonts, colors, sizes, and animations
  • Offers various menu placements

Pricing: Free basic version; Advanced features start at $49 per year.

10) Slider Revolution

Slider Revolution is another popular plugin included in many premium WordPress themes. It helps you spruce up the design of your site with sliders and carousels that contain images, posts, videos, and other content. It’s particularly good for creating an eye-catching front page, and the plugin offers a dedicated editing tool for this task.

Key Features:

  • Includes a visual, drag-and-drop page editor to simplify the design process
  • Lets you add sliders, carousels, and hero scenes to your site
  • Offers a front-page designer so that you can customize your home page

Pricing: Plans start at $35 per year.

Bonus: WP Website Builder by DreamHost

When you host your website with DreamHost, you get access to our powerful WordPress site builder.

This easy-to-use tool allows you to create the perfect layout for your site using drag-and-drop controls. Need some inspiration? Our library of over 200 full-site templates should help you get started. The WP Website Builder also offers valuable SEO recommendations, great content editing tools, and a handy quickstart wizard.

Key Features:

  • Easy drag-and-drop editing of pages and posts, with loads of stylish elements to choose
  • SEO recommendations to ensure your content ranks highly on search engines
  • Over 200 full site templates, which you can install with a couple of clicks

Pricing: The website builder is included free with all our hosting plans, starting from just $2.59 per month.

The Best WordPress SEO Plugins

Search Engine Optimization (SEO) is a proven strategy to help your site rank higher in search engines such as Google and Bing. However, it can be challenging to remember its complicated rules and guidelines. These plugins can help make the process a whole lot easier:

11) Yoast SEO

Yoast SEO

Yoast SEO provides an easy way to hone in on keywords and customize how your posts appear on search engine results pages. To help optimize content, this plugin uses a simple traffic light system – A green light indicates that a post or page is good to go, while a yellow or red light means improvement is needed.

Key Features:

  • Optimize your search engine results with titles, URLs, and meta descriptions
  • Analyze your pages and posts and find areas for improvement
  • Control which of your site pages are displayed in Google search results

Pricing: Core plugin is free; Premium costs $99 per year.

12) All in One SEO (AIOSEO)

With more than 3 million installs to date, AIOSEO is an incredibly popular SEO plugin. It provides a complete set of tools for optimizing your site, packaged in a clean interface. E-commerce and local SEO are strong points for this plugin, along with the beginner-friendly auditing features.

Key Features:

  • Easy editing for meta titles, meta descriptions, and SEO keywords
  • Schema markup, XML sitemaps, and Google Search Console tools
  • Social media integrations

Pricing:  Lite version is free; Pro version with extended features starts at $124 per year.

13) SEO Plugin by Squirrly SEO

Boasting over 650 individual features, Squirrly SEO’s plugin is clearly very capable. However, there is one particular tool that gets us excited: the A.I. SEO consultant. This tool analyzes your site and provides step-by-step instructions on how to optimize it for search. It’s a great idea that can really help those of us with limited SEO knowledge.

Key Features: 

  • Over 650 individual features for SEO
  • AI-powered assistant provides task list for better optimization
  • Keyword research tool that uses fresh data and unique algorithms

Pricing: All features are free with limited usage; Premium plans start at $29.99 per month.

14) SEOPress

Also joining the AI bandwagon is SEOPress. This on-site SEO plugin can create a good meta title and description for any page automatically, and it provides plenty of guidance for content creation. Tight integration with Google and Microsoft analytics allows you to gain key search insights, and SEOPress can even set alt text for images on your website.

Key Features:

  • Content analysis covering unlimited keywords
  • Automatically fills metadata and alt titles using AI
  • Integrates with Google, Microsoft, IndexNow, and OpenGraph

Pricing: Free with core features; Pro version starts at $49 per year.

15) WPSSO

Providing structured data is essential for SEO because it helps search engines and other platforms index the content on your website. WPSSO is a plugin that makes it easy to create and format structured data for every major search engine and plenty of social media sites. It can optimize your images for various platforms, too.

Key Features:

  • Creates structured data, optimized for a range of search engines and social media platforms
  • Optimizes image sizing for various platforms
  • Supports over 500 different schema types

Pricing: Core version is free; Premium features require a $59 one-time purchase. Free add-ons are also available.

16) Rank Math SEO

Billed as the “Swiss Army knife of WordPress SEO,” Rank Math is definitely versatile. One of the first SEO plugins to introduce AI features, this tool provides an intelligent writing assistant. As you compose posts and website copy, the plugin provides dynamic suggestions that should guide you toward the front page of Google.

Key Features:

  • AI writing assistant that provides dynamic suggestions
  • Smart link recommendations
  • Support for 16 types of schema markups

Pricing: Free with basic features; Pro plans with extended features start at $59 per year.

17) The SEO Framework

If optimizing every pixel of your website sounds like hard work, The SEO Framework is worth your attention. This plugin comes preconfigured, and it can intelligently create important SEO meta tags for all of your content. If you’re willing to put in some effort, the plugin provides plenty of good advice. In fact, it follows Google’s best practices exactly.

Key Features:

  • Intelligently creates meta tags in any language
  • Color-coded overview helps you see which pages need improvement
  • Notifies Google and Bing about site changes

Pricing: Free, with premium extensions available.

18) Redirection

When making changes to your website, you may accidentally create broken links. With Redirection, you can fix this issue by redirecting old content to a new URL. This plugin makes it easy to manage all your redirects in one place, even if you’re not familiar with the inner workings of Apache or Nginx.

Key Features:

  • Track 404 errors and implement many redirect types
  • Migrate old permalinks to a new structure
  • Add HTTP headers to your website

Pricing: Free

19) WP 301 Redirects

A slightly more advanced tool, WP 301 Redirects helps you fix three common website errors: redirections, 404 errors, and bad outbound links. It’s really easy to use, and you get full control over redirects and error messages. You can even use it with localization plugins; keep scrolling to see our top picks.

Key Features:

  • Create redirects for pages, posts, custom post types, and archives
  • Works with translation plugins
  • Bulk redirect management

Pricing: Core features are free; Pro license with extended features available on a one-time purchase, starting at $79.

20) Internal Link Juicer

Adding internal links within your content is vital if you want your content to turn up in search results. Inserting links manually can be a chore, but you can automate most of the process with Internal Link Juicer. This highly rated plugin finds suitable posts and pages that already exist on your site, and suggests adding a link when appropriate.

Key Features:

  • Automatic link building based on your chosen keywords
  • Customizable link output, including tags
  • Appears on the post editor screen

Pricing: Free with all core features; Premium version with extended linking options is $69.99 per site.

The Best Security Plugins

Losing full control of your website is a nightmare scenario for any WordPress user. Thankfully, there are loads of great security plugins that can stop threats and reduce spam comments:

21) Akismet

Akismet

Eradicating spam is crucial for securing your website, so it’s important to find tools that monitor comments and emails. Akismet is a plugin from Automattic (makers of WordPress) that filters malicious links and irrelevant content from your site by checking against a global, constantly maintained database. As a result, visitors to your site can enjoy your content without having to wade through the trolls and avoid virus-ridden links.

Key Features:

  • Checks all comments on your site automatically and filters out potential spam
  • Lets you review what’s been marked as spam so that you can correct the plugin if necessary
  • Evaluates contact form submissions to ensure you receive legitimate responses

Pricing: Pay what you want for personal websites; Commercial licenses start at $9.95 per month.

22) Sucuri Security

Sucuri is a popular full-featured security plugin for WordPress. It offers a lot of great features, such as a comprehensive scanning module and easy-to-use monitoring tools. The plugin can even walk you through the recovery steps after an attack. The only key component missing here is a firewall, but we have no complaints, given that Sucuri is completely free.

Key Features:

  • Offers continuous malware scanning
  • Stops hacks and DDoS attacks immediately
  • Provides help for accessing hacked websites

Pricing: Free

23) Jetpack

Jetpack was created by the WordPress developers at Automattic. Although it isn’t a dedicated security plugin, a number of its features can help to protect your site — such as the simple set-and-forget brute-force prevention module. On premium plans, you can also take advantage of malware scanning and automatic site backups to help protect you further.

Key Features:

  • Prevents brute-force attacks from botnets and hackers
  • Monitors your site for downtime and keeps you updated with notifications
  • Provides automatic backups on higher-tiered plans

Pricing: Core features are free; Paid plans start at $5.95 per month, bundled with Akismet credits.

Related: Using Jetpack with DreamPress

24) IThemes Security

Yet another full-featured and popular plugin, iThemes Security is arguably the most comprehensive option on this list. The plugin is packed with features such as login URL obfuscation, a way to change your admin username, and a global dashboard restriction mode based on the time and date. In addition, the premium version includes advanced features such as malware scanning and a Google reCAPTCHA box.

Key Features:

  • Ban the IP addresses of known attackers from your site
  • Monitors your files to check for any unauthorized changes
  • Limits the number of login attempts allowed to prevent brute force attacks

Pricing: Free, with Pro upgrade available for $99 per year.

25) WPS Hide Login 

Hackers using bots will often seek out sites using the default URLs, attacking those they find. To prevent this, WPS Hide Login allows you to change the standard WordPress login URL to a custom one. It’s a pretty simple tool, but it provides a valuable service.

Key Features:

  • Provides an easy-to-use, simple interface
  • Prevents brute force attacks by letting you change the default login URL
  • Doesn’t add rewrite rules

Pricing: Free

26) BulletProof Security

BulletProof Security provides strong protection against SQL injections and other WordPress exploits. In addition, this plugin features a firewall that prevents malicious scripts from executing before they reach your WordPress core files. The premium version adds further features, such as suspicious activity alerts and greater protection against a wider range of threats.

Key Features:

  • Enables you to perform full or partial database backups
  • Prevents the occurrence of brute-force attacks
  • Alerts you when suspected malicious activity affects your site

Pricing: Free, with extended features under a Pro license priced at $69.95.

27) All-In-One Security (AIOS)

Ideal for those who are less familiar with security settings, All-In-One Security (AIOS) makes it easy to defend your content. A simple meter on your dashboard scores the current security of your site. You can then use the wealth of features to shore up any holes in the armor. It has some excellent features around login security, as well.

Key Features:

  • Password strength tool ensures you and your visitors are creating secure passwords
  • Protects against brute force attacks with the Login Lockdown feature
  • Offers one-click database backups, and firewall protection against Cross-Site Scripting (XSS)

Pricing: Core features are free; Premium plan (including malware scanning) starts at $70 per year.

28) Security Ninja

While some security tools bombard you with features, Security Ninja is a lean security plugin that gives you full control over what features you want to implement. The plugin’s main selling feature is the number of tests you can conduct — more than 50 with a single click. You also get a WordPress core file scanner and an event logger, plus you can schedule your scans.

Key Features:

  • More than 50 security tests, including brute-force attacks and password strength tests
  • Checks for vulnerabilities such as zero-day attacks
  • Hides your WordPress version number to prevent hackers from exploiting vulnerabilities in older versions

Pricing: Free with core features; Pro plan with extended features is $39.99 per year, per site.

29) WP Hide & Security Enhancer

Some hackers search for old, vulnerable versions of WordPress, so it’s vital to keep yours up to date. With WP Hide & Security Enhancer, no one will even know you run a WordPress website! With this plugin activated, any WordPress-related identification within your HTML files will be removed or obfuscated without affecting your site’s functionality.

Key Features:

  • Removes the WordPress version number.
  • Blocks access to WordPress’ default core files.
  • Doesn’t change your directory

Pricing: Free core version; Single-site license with full features is priced at $39.

30) Shield Security

Like many other plugins in this section, Shield Security acts as your website’s first line of defense. It only lets trusted, non-harmful traffic through while blocking other malicious traffic. To ensure its protection can’t be removed, the plugin requires an access key before any changes are made — a neat failsafe.

Key Features:

  • Blocks malicious URLs and their requests, along with automated spambot comments
  • Provides security against brute-force attacks via 2FA
  • Instant bot blocking

Pricing: Free; Extra features available via premium upgrade, starting at $79 per year.

31) WordPress Security by CleanTalk

WordPress Security by CleanTalk is a simple plugin that mainly prevents brute-force attacks. If a user fails to log into WordPress, the Security Brute Force Firewall adds a short delay before you can try again. This stops constant attacks on the login screen. It’s a simple and effective way to keep many hackers at bay.

Key Features:

  • Security firewall to filter access to your site by IP, networks, or countries
  • Provides a daily security report sent to your email
  • Sets a delay between login attempts to prevent brute-force attacks

Pricing: Free

32) miniOrange’s Google Authenticator

Our final plugin in this section handles a vital security feature: Two-Factor Authentication (2FA). This offers an additional layer of login protection by requiring login attempts to be verified via a trusted device. Google Authenticator is one of the best available 2FA solutions. The plugin is simple to use and is enabled via scanning a QR code using a mobile device.

Key Features:

  • Log in to your site if you aren’t able to utilize 2FA
  • Customize your own set of security questions
  • Provides multiple login options

Pricing: Free; Enterprise upgrade available (user-based pricing)

33) WP Force SSL

If you haven’t yet heard about HTTPS and SSL, this is an important topic to read up on. In short, HTTPS is a way to encrypt your site’s data more securely, and SSL is a type of certificate that enables this technology to work properly. WP Force SSL is a plugin that redirects traffic toward the secure version of your site, utilizing both of these standards.

Key Features:

  • Redirects traffic from the HTTP to the HTTPS version of your site
  • Handles the redirection automatically after minimal setup
  • Offers loads of security tests

Pricing: Free

The Best WordPress Lead Generation Plugins

Many people use WordPress to build business websites. If your aim is to generate interest in your product or services, these lead generation plugins should help you to engage with potential customers:

34) Contact Form by WPForms

Contact Form by WPForms

Including a contact form directly on your site allows visitors to share their thoughts on your content or to sign up for your services. Contact Form by WPForms makes it really easy to create custom forms for such purposes. This plugin features a drag-and-drop interface, and several pre-built templates to speed up the process.

Key Features:

  • Create and customize contact forms, and insert them into your WordPress pages and posts
  • Makes it easy to add unique fields to your forms
  • reCAPTCHA solution to combat form spam

Pricing: Free; Pro from $99 per year .

35) Popup Builder by OptinMonster

Want to build an email list? Popups by OptinMonster can help. This plugin lets you create custom opt-in forms and pop-ups that will attract the attention of visitors and encourage them to sign up. Every interaction with a pop-up form is tracked, and you can even set up A/B testing to find the most effective designs.

Key Features:

  • Create and customize opt-in forms, with mobile-friendly templates to help get you started
  • Build a variety of pop-up types, such as timed, scroll-triggered, and mobile-specific
  • Provides testing tools to help you get the most out of your lead generation efforts

Pricing: Free to download, but most features require a premium subscription; Plans start at $16 per month.

36) Icegram Engage

Another plugin that can help you build great sign-up forms is Icegram Engage. The pop-ups and CTAs from this tool are a little more basic on the design side, but you still have a ton of customization options and loads of great templates to choose from. Just as importantly, Icegram Enage is secure and compliant with GDPR.

Key Features:

  • Engage visitors with pop-ups, action bars, countdown timers, and more
  • User behavior and exit intent targeting
  • Over 100 base designs to choose from

Pricing: Free with basic features; Premium plans from $129 per year.

37) Icegram Express

Once you have built a subscriber list, you will need to create some content to send out to your audience. Part of the same suite of tools, Icegram Express allows you to send email newsletters and set up automated email updates from your WordPress Admin area. It also provides features for collecting, verifying, and analyzing new subscribers.

Key Features:

  • Create and send custom newsletters from inside WordPress
  • Automated updates when new WordPress blog posts are published
  • Verify new signups and measure the performance of each email campaign

Pricing: Free with basic features; Premium plans from $129 per year.

38) Responsive Contact Form Builder & Lead Generation

It might not have the catchiest name, but Responsive Contact Form Builder & Lead Generation is a well-made plugin for creating custom forms. You get nine different field types to work with, various sizing and styling options, and plenty of premade designs. It works with page builders like Elementor and Gutenberg, and you can even set up autoresponders via the plugin.

Key Features:

  • Create and customize forms, starting from scratch or from pre-built templates
  • Lets you add custom fields and reorder them using a drag-and-drop system
  • Offers multiple ways to receive and store lead information (such as through email and in a database)

Pricing: Free to use with core features; Pro version with extended options is priced at $49 per year.

39) Lead Call Buttons

While email and social media are great for lead generation, the Lead Call Buttons plugin adds special CTA buttons to the mobile version of your site, making it easy for people to call you with a single click. Alternatively, you can add a link to your address or allow people to schedule an appointment with a tap.

Key Features:

  • Add Call Now, Map, and Schedule buttons to the mobile view of your website
  • Provides options for customizing the look and functionality of your CTA buttons
  • Includes the ability to track links

Pricing: Free

40) Easy Forms for MailChimp

MailChimp is a big name in email marketing — so it’s no surprise that the platform has a dedicated plugin. Easy Forms for MailChimp makes it easy to add MailChimp sign-up forms to your posts, pages, and sidebars, and it automatically pulls in your subscription list information from your MailChimp account.

DreamHost Glossary

Sidebar

A WordPress sidebar is an area of the page separate from the main content. It is usually on the left or right side of the page. Here you can add various widgets and advertisements.

Read More

Key Features:

  • Build MailChimp subscription forms and add them to your pages and posts
  • Multiple options for placing your forms, and custom CSS classes for additional styling
  • Integrates with and pulls in the information from your MailChimp subscriber list

Pricing: Free

41) Sumo

Sumo is a highly popular lead generation toolkit that includes an eclectic range of useful features. You can use this plugin to create pop-ups and floating bars to grab potential customers’ attention and add share buttons across your site. Sumo can also handle email marketing, focusing on drip campaigns for e-commerce stores. It even provides analytics to help you figure out what’s working.

Key Features:

  • List Builder that helps create stylish pop-ups, full-screen CTAs and targeted pop-ups, scroll boxes, and more
  • Social sharing features to encourage site visitors to engage with your content
  • Heat maps for fine-tuning your lead generation efforts

Pricing: Free base version; Pro plan with full features priced at $39 per month.

42) HubSpot 

Some WordPress plugins provide specific, targeted features, while others offer comprehensive packages of functionality. HubSpot definitely falls into the second category. This plugin handles classic lead generation tasks such as email list building, newsletter creation, and attracting leads through on-site CTAs. But it also lets you track leads and user behavior on your site, and it works with the Hubspot CRM.

Key Features:

  • Create user-friendly pop-up forms for collecting contact information
  • Loads of analytics tools to track traffic, leads, conversions, and more
  • Integrates with over 1,000 other platforms, including MailChimp, Shopify, and Magento

Pricing: All core features are free; Premium plans start at $50 per month.

43) Optin Forms

While there are a lot of plugins that offer lead capture features, Optin Forms stands out for two main reasons: ease of use, and integrations. This targeted plugin helps you build compelling forms that look great without writing a line of HTML or CSS. Just as importantly, you can use Optin Forms alongside AWeber, MailChimp, GetResponse, iContact, and many other email marketing solutions.

Key Features:

  • Build custom opt-in forms and add them to your site with a click or using a shortcode
  • Offers initial designs you can personalize to suit your needs and tastes.
  • Integrates with a range of popular email marketing services

Pricing: Free

44) LiveChat

Live chat can help you make an immediate connection with visitors to your site. There are many live chat plugins for WordPress, but we’d recommend starting with LiveChat. It’s not the cheapest, but the quality of this add-on cannot be ignored. It works seamlessly with most major page builders, all themes, and every major e-commerce plugin.

Key Features:

  • Adds live chat to your website so you can communicate directly with visitors
  • Syncs with your social, messaging, and email channels
  • Offers customization and chat history features

Pricing: Free; Pro version with additional features, starting at $20 per month.

45) Ninja Forms

There are dozens of contact form plugins we could have included in this list, but Ninja Forms is undoubtedly the most user-friendly. This neat little plugin lets you get creative, customizing forms to your exact needs using simple controls. It’s a solid choice for beginners and developers alike.

Key Features:

  • Drag-and-drop form builder with unique fields, actions, and more
  • Enables you to create success messages for users, or direct them to a particular page after completing a form
  • Provides advanced options for developers, such as built-in hooks and filters
DreamHost Glossary

Custom Hook

‘Hooks’ or ‘webhooks’ enable web applications to communicate with one another using push notifications. When they are customized, they carry out unique functions for a user.

Read More

Pricing: All core features are free; Can be extended with a monthly membership or individual add-ons.

Honorable Mention: LatePoint

LatePoint is a WordPress plugin that’s all about making scheduling a breeze. It’s super handy for all kinds of businesses, from salons to fitness studios. The plugin simplifies the booking process, making it straightforward and user-friendly both for the business owners and their clients.

Key Features:

  • A helpful and intuitive dashboard for easy management
  • Fully extendable and modular for developers
  • Easily integrate with 3rd party apps and plugins

Pricing: A free 7-day sandbox trial is available, with basic plans starting at $49/year.

The Best WordPress Performance Plugins

WordPress does a decent job of serving up content in a timely fashion, but if you want to provide the best possible user experience, these performance plugins should cut your load times down to size:

46) WP Super Cache

WP Super Cache

As you may have noticed, the folks at Automattic develop many functional yet crucial plugins for WordPress. WP Super Cache is no exception. This plugin caches your pages as static HTML files, with minimal setup required. Actually, it offers three different caching modes, each with increasing customization options.

Key Features:

  • Three different ways of caching files: Simple, Expert, and WP-Cache caching
  • Basic CDN support with an integrated OSSDL CDN off-linker
  • Customizable garbage collection settings

Pricing: Free

47) W3 Total Cache

W3 Total Cache is a pretty comprehensive performance plugin, designed to improve both the speed and user experience of your website. The main attraction here is caching: page, object, database, and browser. However, the plugin also offers minification and HTTP compression of the code underlying your site. It all adds up to greatly reduced loading times.

Key Features:

Pricing: Free

48) EWWW Image Optimizer

Using large or poorly optimized images can slow down your site, hurting your overall user experience. EWWW Image Optimizer is a tool that converts, resizes, and compresses images on your site for speed. It’s straightforward to set up, and the plugin adapts to different devices to ensure that you won’t see any significant drop-off in image quality.

Key Features:

  • Automatically optimizes images and converts them into the best file format for performance
  • Provides various compression options, such as pixel-perfect and high compression
  • Includes security features like SSL encryption and free 30-day image backups

Pricing: Free; Premium plans with extra features start at $7 per month.

49) Smush

You could describe Smush as an image optimizer, but that is a bit of an understatement. This impressive plugin offers 2x compression, smart resizing for all standard image formats, and lazy loading. It’s fast, flexible, and easy to use. What’s more, Smush has its own servers — so all the work is handled remotely.

  • Lossless compression to optimize images without a noticeable drop in quality
  • Lazy loading for faster load times
  • Bulk “Smush” for optimizing multiple images at once

Pricing: Core features are free; Pro plan offers background optimization, starting at $7.50 per month.

50) WP Rocket

As a premium caching plugin, you would probably expect WP Rocket to offer more than free alternatives, and to be honest, it delivers in style. This tool provides powerful page caching, GZIP compression, and e-commerce optimization. It can also handle the minification of CSS and JS files, and works with most popular themes and plugins. As an added bonus, you get the extra performance boost of lazy loading on images and iframes.

Key Features:

  • Wide-ranging caching features, including page caching, cache preloading, and browser caching
  • Works with most popular themes and plugins
  • Lazing loading for images and iframes, database optimization, and CDN support

Pricing: Starting at $59 per year.

51) Proxy Cache Purge

After you update your content, Proxy Cache Purge requests your proxy service to delete its cache. This ensures that visitors always get the latest version of your site while still enjoying the performance benefits of caching. You can use this plugin to purge your entire cache or set up automatic purging on specific post and page types.

Key Features:

  • Requests purges for entire cache or specific pages
  • Temporarily disable the cache during development
  • Enables plugins to hook into the purge actions

Pricing: Free

52) WP Fastest Cache

Another caching plugin option, WP Fastest Cache focuses on simplicity. It’s designed to “get out of the way” and let you focus on speeding up your website, not managing plugin settings. Loyal users rave about its simple configuration and excellent support.

Key Features:

  • CDN Support
  • WP-CLI cache clearing
  • Premium plan offers greatly expanded functionality

Pricing: Free

53) Perfmatters

Developed by two brothers with substantial experience in tech, Perfmatters provides a wide array of performance-enhancing features. This premium plugin offers database optimization, lazy loading for videos and iFrames, and a unique script manager that allows you to control which plugins are loaded on each page of your site.

Key Features:

  • Script Manager that allows selective enabling/disabling of plugins and scripts
  • Lazy loading for images, videos, and iframes
  • Database optimization and quick toggle options for reducing load times

Pricing: Starts at $24.95 per year.

54) Autoptimize

One of the most well-known plugins for performance, Autoptimize minifies and caches scripts and styles to improve loading times. It can also inject CSS into the page head and defer scripts to the footer, all in the name of faster browsing. This plugin can even optimize Google Fonts and remove the unnecessary code that comes with WordPress emojis.

Key Features:

  • Minifies and caches scripts, styles, and HTML
  • Moves and defers scripts to the footer, injects CSS into page headers
  • Optimizes images and Google Fonts

Pricing: Free, with enhanced features starting at $5 per month.

55) NitroPack

According to the makers of this performance plugin, installing NitroPack can drastically speed up your site in just five minutes. In fact, they claim that the average site should see a 69% PageSpeed score boost from using this tool. Whether or not you believe these numbers, there’s no doubt that NitroPack is a worthy addition to this list.

Key Features: 

  • Can be installed and configured with zero technical knowledge
  • Advanced caching, minification, compression, and image optimization
  • Built-in global CDN

Pricing: Free with limited features; Premium plans start at $17.50 per month.

The Best WordPress E-Commerce Plugins

Did you know that you can build a great online store with WordPress? Whether you’re selling T-shirts or digital downloads, these plugins can help you create your e-commerce empire:

56) WooCommerce

WooCommerce

If we’re going to talk about selling products via WordPress, the conversation has to start with WooCommerce. By far the most popular e-commerce plugin, this platform provides a remarkable list of features completely free — from inventory tracking to shipping label printing. It might take a while to get your head around all of the options here, but it’s definitely worth the effort.

Key Features:

  • Create a storefront in minutes, with loads of ready-made themes and customization options
  • Custom product pages with drag-and-drop editor
  • Sell products, downloads, subscriptions, bookings, memberships, and more

Pricing: Free, with premium upgrades available.

Want to get set up with WooCommerce faster? Try our dedicated e-commerce hosting!

57) Easy Digital Downloads

If your online store specializes in digital products, you might want to try Easy Digital Downloads. Optimized for products like themes, courses, and ebooks, this free plugin offers strong file protection and loads of payment processing options, including PayPal and Stripe. It works with pretty much any theme, and we especially like the clean and customizable checkout.

Key Features:

  • Optimized for selling digital products, with file protection
  • Works with any theme
  • Strong customer management and promotion features

Pricing: Free for core features; Advanced features available through “Passes” starting at $199 per year.

58) Ecwid Ecommerce Shopping Cart

Originally promoted as a social media e-commerce platform, Ecwid now plays nicely with WordPress. This means you can set up a store on your website, and it will sync with your Facebook and Instagram profiles. You will need an Ecwid account to unlock this compelling package, but this will also give you access to a dedicated mobile app. Pretty useful, we think.

Key Features:

  • Shopping cart with multiple payment options, automatic taxes, and shipping
  • Products sync between your website and social media profiles
  • Dedicated mobile apps for managing your store

Pricing: Free with limited features; Paid plans start at $19 per month.

59) SellKit

WooCommerce is pretty powerful straight out of the box, but with SellKit, you can optimize the checkout area to drive more sales. For instance, this plugin lets you add one-click upsells and autocomplete on forms. You can even offer custom discounts based on user behavior. Of course, you can also measure the effectiveness of every change using the built-in analytics tools.

Key Features:

  • Vast range of tools for optimizing the checkout experience in WooCommerce
  • Rule-based triggers for “bump” offers and one-click upsells
  • Custom sales funnel builder with loads of ready-made templates

Pricing:  Free with limited features; Premium plans start from $59 per year.

60) ShopWP

If you’re really into e-commerce, there is a fair chance you already have a store hosted with Shopify. ShopWP allows you to bring all your products across to your WordPress website and present them perfectly. This plugin uses no iFrames — it’s all native and optimized for search. You can even drop in products using a shortcode.

  • Syncs Shopify data to ensure your product listings on WordPress are always up-to-date
  • Seamless shopping cart experience powered by JavaScript
  • Provides 10+ shortcodes and works with top page builders

Pricing: Free with core features; Premium plan with advanced display options starts at $199 per year.

61) WP EasyCart

WooCommerce not floating your boat? WP EasyCart is a worthy alternative. Ten years in the making, this shopping cart plugin serves up a variety of useful e-commerce features — from live shipping estimates to cart abandonment emails. You also get to choose from loads of great payment options, including Amazon Pay and Square.

Key Features:

  • Multiple product types and product page customization
  • Allows you to sell subscriptions and memberships
  • Inventory management and order fulfillment tools

Pricing:  Free version with core features; Premium plan with extended features starts at $69 per year.

62) Wish List for WooCommerce

There are many add-ons made for WooCommerce that expand the base features of the plugin. These include official extensions, along with unofficial plugins and themes developed by the community — Wish List for WooCommerce is one such add-on. Quite simply, it adds a wish-list feature to your online store so customers can save their favorite products.

Key Features:

  • Adds a customizable wish-list feature to your site
  • Offers a dedicated widget that points to your wish-list page
  • Lets users share their lists on email and social media

Pricing: Free

63) FunnelKit 

For anyone who is serious about building a successful store, FunnelKit could be really useful. This highly-rated WordPress funnel builder is one of the best plugins for enhancing WooCommerce. Using simple controls, you can streamline your checkout, add relevant upsells, and create opt-in forms. Plus, it comes with over 20 great e-commerce templates.

Key Features:

  • Streamlined checkouts, with express pay options and address autocomplete
  • A/B testing and traffic routing to the better-performing page
  • In-depth insights and analytics, including open rate, clickthrough rate, revenue made, orders placed, and more

Pricing: Free version with basic features; Full feature list on premium plans, starting at $129 per year.

64) AffiliateWP

One good way to drive potential customers to your site is through affiliate marketing. AffiliateWP helps you take advantage of this approach. The plugin makes creating and managing your affiliate program for your WooCommerce store incredibly simple. Fraud protection ensures that affiliates can’t make money from endlessly clicking on their own links, and you can see your revenue stacking up via the built-in analytics.

Key Features:

  • Reliable tracking with fraud protection and smart commission rules
  • One-click payouts for affiliates
  • No extra fees

Pricing: Starts at $299 per year.

65) FOMO & Social Proof Notifications by TrustPulse

Social proof, such as customer reviews and testimonials, can be a powerful tool in e-commerce. TrustPulse’s plugin helps you leverage the activity of your customers to make new sales, with pop-ups that deliver timely messages. More specifically, this FOMO-generating tool shows activity from other visitors on your site — like when someone makes a purchase.

Key Features:

  • Instant pop-ups show when someone takes action on your site, creating a sense of real-time activity
  • Customizable notifications that can be adapted to your brand
  • Designed to work with WooCommerce

Pricing: Basic plugin is free with limitations; Premium plans start at $9 per month.

The Best Website Admin WordPress Plugins

WordPress makes it relatively easy to keep your website running smoothly. However, you can enhance the core functionality by installing the right plugins. Here are some website admin tools to consider:

66) Easy Updates Manager

Easy Updates Manager

To keep any WordPress site running efficiently, you must ensure the system, your themes, and your plugins are updated regularly. Easy Updates Manager helps take care of this process automatically. This lightweight plugin is simple to use, and you can customize the settings so that only the updates you want are installed.

Key Features:

  • Lets you enable or disable updates for plugins, themes, WordPress, and more
  • Automate updates for all software of a particular type, or only for specific plugins and themes
  • Provides user customization options, such as the ability to block certain users from performing updates

Pricing: Core features are free; Premium upgrade with extended features from $29 per year.

Want to make updates even easier? When you host your site with DreamPress, we keep your WordPress updated automatically.

67) UpdraftPlus 

Backing up your site is really important if you want to avoid downtime. UpdraftPlus makes it really easy. This plugin lets you upload a copy to the most popular cloud storage platforms, such as Dropbox and Google Drive. You can even set an automatic backup schedule. Once you have a backup, the plugin allows you to restore your site with a few clicks.

Key Features:

  • Supports both manual and automatic scheduled backups
  • Provides encryption to your backups
  • Enables you to upload your backups to any number of cloud storage providers

Pricing: Free with basic features; Premium upgrade starts at $70.

68) Duplicator

A good WordPress backup plugin is Duplicator. Downloaded over 30 million times, this plugin lets you save a complete clone of your site. This can work for ad hoc backups, but it’s perhaps more useful for migrating your site or creating a locally hosted version. With the premium version of this plugin, you can also schedule automatic backups.

Key Features:

  • Create backups of your WordPress website automatically and save them to the cloud
  • Clone, copy, or migrate your site to another server
  • Makes it easy to create a staging site for testing purposes.

Pricing: Free version allows manual cloning; Premium version with scheduled backups and cloud storage integrations, starts at $99 per year.

69) WPFront User Role Editor

DreamHost Glossary

User Role

Users in WordPress can be one of six default roles: Super Admin, Administrator, Editor, Author, Contributor, or Subscriber. WordPress provides a user role management system that defines what users are allowed to do on your website.

Read More

By default, WordPress lets you assign varying roles to individual users. These user roles have different permissions levels —for example, an Administrator can edit or change just about anything on the site. If you find yourself wanting to adjust the default settings, try WPFront User Role Editor. This plugin lets you create new roles, edit and rename the default roles, and more.

Key Features:

  • Lets you create, rename, edit, and manage user roles on your site
  • Adds or removes capabilities from specific roles
  • Enables you to assign multiple roles to each user

Pricing: Free with very limited features; Pro license is priced at $89 per site.

70) User Role Editor

User Role Editor is another plugin that enables you to customize the default WordPress user roles, and determine exactly what each type of user should be able to do. The free version of this tool is pretty generous, giving you granular control over user permissions. Upgrade to the premium version, and you gain the ability to hide specific menu items from various user types.

Key Features:

  • Edit the capabilities of the default WordPress user roles.
  • Add and customize new user roles
  • Assign more than one role to a single user.

Pricing: Free version with core features; Extended premium version starts at $29 per month, or $89 for a lifetime license.

71) Oasis Workflow

The goal of Oasis Workflow is to help you manage your site more efficiently, particularly when it comes to creating and publishing content. The plugin provides a drag-and-drop interface that enables you to create a custom workflow for you and your team. You can assign tasks, give them custom statuses, and move them around or reassign them as necessary.

Key Features:

  • Drag-and-drop workflow designer with an easy-to-use interface
  • Create, assign, and reassign tasks as needed.
  • User-based rules to automatically route tasks to the correct team members

Pricing: Free version covers most core features; Premium version adds automations, starting at $119.

72) Enhanced Media Library

The WordPress Media Library lets you upload images, videos, and other media files to add to your site. Enhanced Media Library makes it more powerful. For example, this plugin allows you to categorize and tag media items so they’re easier to organize and find. Plus, you’ll get access to a variety of useful shortcodes and a more flexible way to control media file types.

Key Features:

  • Lets you add categories and tags to files in your Media Library
  • Provides filters to help you search through and sort your media files
  • Adds shortcodes that enable you to categorize media items on the front end

Pricing: Free, with extra features/the pro license priced at $25.

73) ACOS – Custom Admin Color Scheme

While you can’t customize the back end of WordPress as much as the front end, you can make a few tweaks. With ACOS, you can liven things up with a splash of color. WordPress already comes with eight color schemes for your admin area, but this plugin adds eight more– You’ll have double the options!

Key Features:

  • Adds eight new color schemes for your WordPress admin area
  • Lets you quickly switch between schemes
  • Reverts to default color schemes with a click

Pricing: Free

74) Admin Menu Editor

Even though WordPress is pretty intuitive, all the different options can feel overwhelming for new site owners. Admin Menu Editor helps you reduce the visual clutter by enabling and disabling specific menu items in the admin area. You can even add your own custom links to the menu.

Key Features:  

  • Rename, rearrange, and add menu items
  • Drag-and-drop controls
  • Custom branding for your login screen

Pricing: Free basic plugin; Premium version available with per-user control, starting at $39.

75) Advanced Custom Fields (ACF)

Out of the box, WordPress can handle a lot of different data types. But if you want to add something extra to your posts and pages, Advanced Custom Fields (ACF) can help. This very intuitive plugin allows you to add and display custom fields almost anywhere, with 30 different field types to choose from.

Key Features: 

  • Add fields to posts, users, taxonomy terms, media, comments, and more
  • Intuitive field creation process
  • Over 30 field types, and supports custom post types

Pricing: Free; Separate pro version available for $49 per year.

77) MainWP

Running more than one WordPress site? MainWP lets you manage them all from a single dashboard. This free, open-source plugin is great for handling updates, installing themes, and even managing users across your sites. You can also review comments in bulk, and monitor uptime across your online empire.

  • Manage all your WordPress sites from one central dashboard
  • Handle updates for themes, plugins, and core WordPress files
  • Post and edit content across all your sites from the dashboard.

Pricing: The main plugin is free; Pro plans with extensions included start at $29 per month.

The Best WordPress Analytics and Reporting Plugins

Whether you want to reach more readers or attract new customers, understanding how people are interacting with your site is really important. These analytics plugins can reveal all:

78) MonsterInsights

MonsterInsights

MonsterInsights is the most popular Google Analytics plugin for WordPress. It provides a Google-specific dashboard right in your WordPress admin panel, and you can track your customers across multiple platforms and devices. Unlike other link-tracking plugins, MonsterInsights won’t slow down your website.

Key Features:

  • Provides custom reports for data regarding Audience, Behavior, Content, E-commerce, Forms, Search Console, and Custom Dimensions
  • Offers easy integration with WooCommerce for product and sales tracking
  • Enables use of tracking for Google Adsense and affiliate links

Pricing: The core plugin is free; Premium versions start at $99.50 per year.

79) Site Kit by Google

Google offers many free tools to analyze your website’s success. With Google Site Kit, all of these products are combined in your WordPress dashboard. This means you can explore page speed, SEO, and audience analytics, and set up various Google products without code.

Key Features:

  • Implements site analytics on your WordPress dashboard
  • Provides metrics from Search Console, AdSense, PageSpeed Insights, and more
  • Integrates Google tools without editing your website’s source code

Pricing: Free

80) StatCounter

Most WordPress analytics plugins allow you to analyze your audience over a period of time. But with StatCounter, you can see this data in real-time. This tool can track almost anything you can dream of, from keyword activity to the presence of cookie blocking. You can view the data inside your WordPress admin area, or get StatCounter to send you email reports.

Key Features:

  • Granular visitor analytics covering visitor paths, duration of visit, exit pages, and more
  • Real-time statistics
  • Visitor alerts when certain users return to your site

Pricing: Free with basic StatCounter account; Paid plans start at $9 per month.

81) WP Statistics

If you don’t want to rely solely on Google products, you can take control of your analytics with WP Statistics. This powerful plugin captures a wide range of data about your audience, which you can view in your admin area or export to popular file types. We like the colorful design, too.

Key Features:

  • Captures visitor data including IP, browser, search engine, OS, and location
  • View stats in WordPress or export your data
  • GDPR compliant

Pricing: Free; Premium extensions available from $39 per year.

82) Matomo Analytics

Honed for business, Matomo Analytics is a plugin that provides valuable insights, without sacrificing privacy. In fact, you own 100% of the data that this plugin collects, and the plugin comes with an opt-out widget for your users. The whole package is completely free to use, and easy enough for even a WordPress beginner to install.

Key Features:

  • Powerful visitor analytics tools and visualizations
  • Strong privacy protection
  • Supports data import from Google Analytics or WP Statistics

Pricing: Free, with premium upgrades starting at $39 per year.

83) Conversios

Aimed at e-commerce websites, Conversios is an analytics plugin that helps you track customers from the moment they click on your ad to the instant they make a purchase. To make this work, the plugin combines Google Analytics 4, Google Ads, Microsoft Ads, and the tracking systems for most social media platforms.

Key Features:

  • Pixel manager to track events across all popular social channels
  • Remarketing features to engage potential customers
  • Works with Google Analytics 4 and Google Tag Manager

Pricing: Free; Premium features start at $99 per year.

84) Independent Analytics

Independent Analytics strikes a nice balance between features and usability. Yet another alternative to Google Analytics, this free plugin lets you track views, visitors, and referrers. It’s completely compliant with GDPR, and has almost no impact on the performance of your site.

Key Features:

  • Comprehensive analytics dashboard within WordPress
  • Full GDPR compliance with additional configuration
  • Deep WordPress integration for valuable traffic source insights​

Pricing: Free; Pro version adds real-time data for $99 per year.

85) ExactMetrics

Our favorite thing about ExactMetrics is that this plugin allows you to check your Google Analytics data via your WordPress Dashboard. But this isn’t the only worthwhile feature; for instance, it can handle Meta Pixel and Bing Ads tracking. ExactMetrics can even send you a weekly update about your traffic.

Key Features:

  • Displays Google Analytics data in your WordPress Dashboard
  • Supports dual-tracking with Google Analytics 3 and GA4
  • Weekly email updates with your traffic numbers

Pricing: Lite version is free with limited features; ExactMetrics Pro offers the full feature list, starting at $99.50 per year.

86) 10WebAnalytics

Part of a larger suite of marketing tools, 10WebAnalytics is another plugin that brings Google Analytics to your WordPress admin. While not as polished as some of the other plugins in this section, it works well and delivers an impressive amount of data.

Key Features:

  • Displays all of your Google Analytics reports
  • Supports custom notifications and alerts
  • Lets you create and manage goals

Pricing: Free with limited features; Premium packs start at $85.

87) WP Google Analytics Events

It’s time to get a little bit nerdy. Google Analytics 4 allows you to create custom events — user actions on your site that you want to track. WP Google Analytics Events allows you to set up these events without messing around with code.

Key Features:

  • Code-free interface for creating custom events
  • Track in-page navigation and contact form submissions
  • Integrates with Google Tag Manager

Pricing: Free; Premium upgrades start at $79 per year.

The Best WordPress Localization Plugins

If you want to reach a global audience with your WordPress site, it’s a good idea to translate your content. These localization plugins can help you adapt your website for different markets:

88) ConveyThis

ConveyThis

Offering fast and accurate automatic machine translation for 120 languages, ConveyThis is a great tool for localizing any WordPress website. It can also translate attributes, alt text, meta-text, and page URLs. Plus, it works with pretty much any theme or other plugin, including WooCommerce​.

Key Features:

  • Fast, accurate machine translation in 120 languages
  • SEO-friendly output
  • Works with 100% of themes and plugins

Pricing: Free for up to 2,500 words in one language; Upgrades start at $7.99 per month.

89) Loco Translate

For website owners who are happy to get more hands-on, Loco Translate provides an in-browser editing tool for WordPress translation files. The interface is pretty easy to navigate, and the plugin offers keyboard shortcuts for faster translating. You don’t necessarily need to translate content manually; this plugin integrates with translation APIs, including DeepL, Google, Microsoft, and Yandex.

Key Features:

  • Translation management inside WordPress Admin
  • Integrates with top automated translation tools
  • Built-in locale codes for every region of the world

Pricing:  Free up to 2,000 translations, and then $5.95 per month.

90) Polylang

Polylang allows you to create a bilingual or multilingual WordPress site with a translation tool covering custom post types, custom taxonomies, widgets, and menus. It provides full support for right-to-left (RTL) language scripts, and can automatically download and update WordPress language packs​.

Key Features:

  • Translation management that covers custom post types, custom taxonomies, widgets, and navigation
  • Support for RTL scripts
  • Based on core WordPress technology for better performance

Pricing: Base plugin is free to use; Pro version starts at €99 (~$105).

91) GTranslate

When you need a quick translation for something you see online, which app do you use? Probably Google Translate. The GTranslate plugin drops that same functionality into your WordPress site. It can translate over 100 languages on the fly, with full support for all right-to-left (RTL) languages​.​ Upgrade to the premium version, and you get the benefits of neural machine translation.

Key Features:

  • Adds real-time Google Translation to your website, without the Google branding
  • Works on posts, pages, widgets, menus, and more
  • Premium version offers multilingual SEO and neural machine translations

Pricing: All core features are free; Premium plans start at $9.99 per month.

92) TranslatePress

Most localization plugins have the usability of 90s database software. TranslatePress stands out thanks to its user-friendly interface that allows you to easily translate the entire page at once. The plugin even covers the content from your shortcodes, forms, and page builders. If you don’t want to handle localization yourself, you can do automatic translations with Google Translate.

Key Features:

  • Live on-page editor allows you to translate content with context
  • Works on content from shortcodes, forms, and page builders
  • Provides Google Translate integration and support for WooCommerce

Pricing: Free; Premium add-ons start at €7.99 (~$8.53) per month.

93) Google Language Translator

Now part of the GTranslate family, Google Language Translator is a plugin that offers similar features in a slightly different package. This tool automatically hooks up to the Google Translate API automatically and can fetch translations for any supported language. It works on posts, pages, categories, tags, menus, and widgets, along with content from other plugins​​.

Key Features:

  • Automatic translation with Google Translate API
  • Translates content from themes and other plugins
  • Premium version offers multilingual SEO and neural machine translations

Pricing: All core features are free; Premium plans start at $9.99 per month.

94) Weglot Translate

It would probably be fair to say that Weglot Translate is one of the easiest translation plugins to configure. There’s even a multilingual user guide if you need it. The plugin works with all themes and other plugins, and it follows Google’s best practices for good SEO. In terms of machine translation, you have a choice of DeepL, Google, Microsoft, and Yandex.

Key Features:

  • Easy to install and detects new content for translation
  • Follows SEO best practices
  • Provides high-quality machine translation and access to professional human translation

Pricing: Free for the first 2,000 words; Paid plans start from $17 per month.

95) Bogo

If you’re just looking for a way to manage translations of your content, Bogo should do just fine. This free plugin lets you set up a multilingual site, with a language switcher widget to help visitors find the right version for them. It’s simple, but very efficient.

Key Features:

  • Adds localization options to your WordPress admin
  • Includes language switcher widget
  • Based on WordPress core features

Pricing: Free

Bonus: AI Plugins for WordPress

Artificial intelligence is changing the way we interact with the web. It is also providing website owners with new tools, like these AI plugins for WordPress:

96) AI Engine

AI Engine

AI Engine lets you play with ChatGPT and other GPT models. You can use it to generate content and images, suggest titles, and create excerpts. It also tracks your OpenAI usage stats.

Pricing: Free, but requires OpenAI subscription.

97) WordLift

By leveraging AI, WordLift allows you to compose SEO content faster than you can type. It delivers engaging, accurate writing, and the plugin handles all the chores related to optimizing your posts for search.

Pricing: From €49 (~$52) per month.

98) AI ChatBot

When you’re not around to engage with visitors to your website, AI ChatBot can strike up a conversation. Powered by natural language processing, this impressive plugin is great for providing interactive customer support.

Pricing: Free with limited features; Full version starts at $49 per year.

99) ImageSEO

Alt texts are pretty important for SEO, but filling them out takes time. ImageSEO provides a neat shortcut by using AI technology to automate the whole process.

Pricing: Free for 10 images per month; Paid plans from ​​€4.99 (~$5.30) per month.

100) AI Content Writing Assistant

With 20 different writing styles and over 40 tones to choose from, AI Content Writing Assistant is undoubtedly a versatile plugin. This content generation tool supports multiple languages, and it even works on locally hosted websites.

Pricing: Free

…And That’s Not All

Whew. We’ve made it to the end of our list. But we’ve only scratched the surface of all the amazing extensions, power-ups, and plugins available for your WordPress site. You can find many of these tools and thousands more for free in the WordPress Plugin Directory.

Of course, the world’s top WordPress plugins won’t make much difference to your website if your host isn’t up to the challenge. Here at DreamHost, our hosting plans are optimized specifically for the WordPress platform.

Our managed WordPress hosting makes it really easy to maintain your website and keep it running smoothly — even when you install loads of plugins. And with plans starting at just $16.95 per month, it’s open to anyone.

Don’t need a managed site? Our shared hosting offers the same guaranteed uptime and strong performance, with plans starting at only $2.59 per month.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

The post The 100 Best WordPress Plugins (Including New AI Tools) appeared first on Website Guides, Tips & Knowledge.

]]>