Get Your Online Presence

It doesn’t matter if a company has only one employee, every business needs a website. Companies without an online presence are missing out on money. An attractive, informative Web presence is a key to drawing in potential clients or customers. This means you need to choose a web hosting service and set up your website. With the right web hosting provider, the process can be relatively simple and reasonably affordable.

Although choosing the best web hosting company can be a confusing task since so many web hosting providers offer similar services. Hopefully, Onlinespaces.com can make that decision a little bit easier by providing information about the different companies and the services they offer.

Hosting ServicesFree Domain NameShared HostingVPS HostingDedicated HostingReseller HostingManaged Wordpress HostingCloud HostingLinuxWindows
www.1and1.com

Digital Ocean web hosting services
DreamHost web hosting sreives
affiliate_link
Virtual Private Servers from GoDaddy! Get 1 month FREE!


38% Off Today!
Interserver
Liquid Web Fully Managed Web Hosting
cropped-illustration-Robot-1.jpg
servermania300x250
Web Hosting
Web.com Unlimited Hosting

DisclosureWe are a professional review site that receives compensation from the companies whose products we review. We test each product thoroughly and give high marks to only the very best. We are independently owned and the opinions expressed here are our own.

Dump MySQL Database Tables into Separate Files

mysql

Need to dump your mysql database tables so that each table is in a separate file? And, the tables are too big for phpMyAdmin? This script will help.

#!/bin/bash

# dump-tables-mysql.sh
# Descr: Dump MySQL table data into separate SQL files for a specified database.
# Usage: Run without args for usage info.
# Notes:
#  * Script will prompt for password for db access.
#  * Output files are compressed and saved in the current working dir, unless DIR is
#    specified on command-line.

[ $# -lt 4 ] && echo "Usage: $(basename $0) <DB_HOST> <DB_USER> <DB_NAME> <DIR> [<PORT>]" && exit 1

DB_host=$1
DB_user=$2
DB=$3
DIR=$4
PORT=$5

[ -n "$DIR" ] || DIR=.
test -d $DIR || mkdir -p $DIR

[ -n "$PORT" ] || PORT=3306

echo -n "DB password: "
read -s DB_pass
echo
echo "Dumping tables into separate SQL command files for database '$DB' into dir=$DIR"

tbl_count=0

for t in $(mysql -NBA -h $DB_host --port=$PORT -u $DB_user -p=$DB_pass -p$DB_pass -D $DB -e 'show tables') 
do 
    echo "DUMPING TABLE: $DB.$t"
    mysqldump --host=$DB_host --port=$PORT --user=$DB_user --password=$DB_pass $DB $t --result-file=./$DIR/$t.sql
    tbl_count=$(( tbl_count + 1 ))
done

echo "$tbl_count tables dumped from database '$DB' into dir=$DIR"

Example

$ mysqldump.sh localhost root database_table ./mysql_table_dump

Docker Development Environment – Getting Started (DDE Part 7)

getting started

Getting Started

Here are the answer to some common questions to help you when getting started.

Where do you put your web application files?

All files that are going to be served by your web server are placed in project/web directory. This will be different if you changed the PROJECT_NAME and/or WEBSITE_DIR values. We can use tools like PHP Storm to edit these files on our local machine and the files are automatically updated inside the container.

How do I connect to my containers?

$ docker-compose exec container-name bash

So, run the following to connect to the NGINX container:

$ docker-compose exec nginx bash

 The PHP-FPM container also allows you to connect to it with SSH. Connecting to a container via SSH is usually not best practice. But, on Windows, connecting to a container using the above command (docker-compose exec php-fpm bash) has had issues because Windows does not support interactive mode. And, even though this has improved with the current version of Docker, 1.13.0, it is much easier to SSH into the PHP-FPM container. Also, this is a development environment and not used for production. So, it should not be an issue.

Why should I connect to the PHP-FPM container?

One reason to use a virtual machine or a Docker container is to keep the host machine as clean as possible. When we log into the PHP-FPM container, we can use git, composer, npm, bower, yarn, gulp, etc. without having them installed on our host machine.

How do I connect to the database?

With a MySQL client

Hostname:  localhost or project.local

User:  root

Password: root

Port: 3306

From withing the PHP-FPM container

$ mysql -u root -p --host=mysqldb

From Drupal or Symfony

Use mysqldb as the hostname.

Can I use phpMyAdmin?

Yes! But, you have to create a phpMyAdmin container first. You can do this by adding the following to the docker-compose.yml file:

phpmyadmin:
  image: phpmyadmin/phpmyadmin
  ports:
    - "8080:80"
  environment:
    PMA_HOST: mysqldb
    PHP_UPLOAD_MAX_FILESIZE: 1G
    PHP_MAX_INPUT_VARS: 1G
    VIRTUAL_HOST: ${PHPMYADMIN_DOMAIN_NAME}

Then, stop all containers and start them again.

$ docker-compose stop
$ docker-compose up --build

Then, visit http://project.local:8080.

Useful Commands

List containers

$ docker-compose ps

Create and start containers

$ docker-compose up
  • Add –build to make sure the containers are rebuilt.
  • Add -d to have the command prompt returned to use so you can run more commands.

Stop containers

$ docker-compose stop

Start containers

$ docker-compose start

Connect to a container

$ docker-compose exec container-name bash

Cleanup

Sometimes you just need to clean things up. These things will stop and remove containers.

$ docker stop $(docker ps -aq)
$ docker-compose rm -f
$ docker rm -f $(docker ps -aq)
$ docker rmi -f $(docker images -aq)

Summing It Up

You should now have a development environment that you use to develop your web applications. Hopefully, this series of post has not only provided you a docker-base development environment that can be used for development but also some useful information so that you can expand upon it or build your own.

You can find the complete source code for this environment on GitHub.

NGINX – Docker Development Environment (DDE Part 6)

nginx

NGINX

If you have made it this far, nice job! Now, let’s create out NGINX container.

Let’s start by adding the following service in our docker-compose.yml file below the php-fpm service we created in the last post.

    nginx:
        build:
            context: ./docker/nginx
            args:
                APPLICATION_TYPE: ${APPLICATION_TYPE}
                PROJECT_NAME: ${PROJECT_NAME}
                WEBSITE_DIR: ${WEBSITE_DIR}
        restart: always
        links:
            - php-fpm
        volumes_from:
            - php-fpm
        volumes:
            - ./logs/nginx:/var/log/nginx
        environment:
            - VIRTUAL_HOST=${DOMAIN_NAME}
            - DOMAIN_NAME=${DOMAIN_NAME}
            - PHP_FPM_PORT=${PHP_FPM_PORT}
            - "${HTTP_PORT}:${HTTP_PORT}"
            - "${HTTPS_PORT}:${HTTPS_PORT}"

By now, this should make sense to you. Here, we want to have a link to the php-fpm container so we can use PHP on our web server and use the volumes from php-fpm so we have files that we can serve with the web server.

To get started, copy the Dockerfile, docker-entrypoint.sh, and nginx.conf files from here into the docker/nginx directory. If you haven’t already, create a directory called conf.d in the docker/nginx directory and copy the files from here into it.

Dockerfile

For the sake of sanity and brevity, we are only going to look at some key points in the Dockerfile.

ENV APPLICATION_TYPE=${APPLICATION_TYPE}
ENV PROJECT_NAME=${PROJECT_NAME}
ENV WEBSITE_DIR=${WEBSITE_DIR}

In order to be able to use value that we have defined in the .env file, we need to assign those values to environment variables.

ARG variables are passed to the Dockerfile and are only available while the container is being built. Once the container is built, they are no longer available.

ENV variables are used once the container is built so can be used inside scripts that are run inside the container. But, they are unavailable while the container is being built.

COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

CMD ["/usr/local/bin/docker-entrypoint.sh"]

The above does the following:

  1. Copies the docker-entrypoint.sh script into the container.
  2. Makes sure that we can execute the script.
  3. Runs the script.

docker-entrypoint.sh

We are almost done! Let’s take a look at the docker-entrypoint.sh file to make sure you know what’s going on.

if [ ! -d "/etc/nginx/sites-enabled" ]; then
    mkdir /etc/nginx/sites-enabled
fi

This creates the sites-enabled directory if it doesn’t already exist.

if [ -n "$APPLICATION_TYPE" ]; then
    if [ "$APPLICATION_TYPE" = "drupal8" ]; then
        cp /etc/opt/docker-files/drupal8.conf /etc/nginx/sites-enabled/${PROJECT_NAME}.conf
    else
        cp /etc/opt/docker-files/symfony.conf /etc/nginx/sites-enabled/${PROJECT_NAME}.conf
    fi
fi

If the environment variable, $APPLICATION_TYPE, is defined, copy the appropriate configuration file into sites-enabled.

sed -i "s/#DOMAIN_NAME#/${DOMAIN_NAME}/g" /etc/nginx/sites-enabled/${PROJECT_NAME}.conf
sed -i "s/#PROJECT_NAME#/${PROJECT_NAME}/g" /etc/nginx/sites-enabled/${PROJECT_NAME}.conf
sed -i "s/#PHP_FPM_PORT#/${PHP_FPM_PORT}/g" /etc/nginx/sites-enabled/${PROJECT_NAME}.conf
sed -i "s/#WEBSITE_DIR#/${WEBSITE_DIR}/g" /etc/nginx/sites-enabled/${PROJECT_NAME}.conf

Using inline replacement, we replace the defined placeholders with the appropriate value.

exec nginx -g "daemon off;"

This starts the NGINX web server.

Now run the following to build our web server container:

$ docker-compose up --build -d

That’s it! You now have a docker-based development environment with PHP-FPM, MySQL, and NGINX containers. 

Name               Command                 State        Ports
-------------------------------------------------------------------------
mysqldb_1    docker-entrypoint.sh mysqld    Up     0.0.0.0:3306->3306/tcp
nginx_1      /usr/docker/bin/docker ...     Up     0.0.0.0:80->80/tcp, 
                                                   0.0.0.0:443->443/tcp
php-fpm_1    docker-php-entrypoint /usr     Up     0.0.0.0:2222->22/tcp,
                                                   0.0.0.0:9000->9000/tcp,
                                                   0.0.0.0:9001->9001/tcp

At this point, you could create a directory called web in the project directory and add a PHP page to it. You can then visit http://project.local in your browser and see the page.

Next, we will discuss some useful commands to get started using this environment.

PHP – Docker Development Environment (DDE Part 5)

php

PHP

In this post, we are going to setup our PHP container. In order to make this post a little shorter, I will skip explaining concepts covered in previous posts.

Let’s start by adding the following service in our docker-compose.yml file below the mysqldb service we created in the last post.

php-fpm:
  build:
    context: ./docker/php-fpm/${PHP_VERSION}
    args:
      PROJECT_NAME: ${PROJECT_NAME}
      XDEBUG_IDE_KEY: ${XDEBUG_IDE_KEY}
      XDEBUG_REMOTE_PORT: ${XDEBUG_REMOTE_PORT}
      TIME_ZONE: ${TIME_ZONE}
      PHP_FPM_PORT: ${PHP_FPM_PORT}
    restart: always
    ports:
      - "${PHP_FPM_PORT}:${PHP_FPM_PORT}"
      - "${XDEBUG_REMOTE_PORT}:${XDEBUG_REMOTE_PORT}"
      - "${SSH_PUBLIC_PORT}:22"
    volumes:
      - ./${PROJECT_NAME}:/var/www/${PROJECT_NAME}
    links:
      - mysqldb

In the above, we are:

  1. Defining arguments that we will pass to our Dockerfile,
  2. Creating a volume that is shared between the local host machine and the docker container that allows us to access and edit our code on the local machine. This allows us to use tools such as PHPStorm to develop our application.
  3. Creating a link between our php-fpm container and the mysqldb container that we created in the last post. This will do two things:  makes sure that mysqldb is created first and allows php-fpm to use the database mysqldb.
links:
  - mysqldb

Next, copy the files found here into the docker/php-fpm/7.0/ directory and these files into the docker/php-fpm/5.6/ directory. In order to keep this post a reasonable length, we will just look at some key points that may be unclear.

Dockerfile (7.0)

FROM php:7.0-fpm
MAINTAINER Your Name <yourname@email.com>

From DockerHub, we will use the7.0-fpm version of the official PHP image.

ARG PROJECT_NAME
ARG XDEBUG_IDE_KEY
ARG XDEBUG_REMOTE_PORT
ARG TIME_ZONE
ARG PHP_FPM_PORT

These are the arguments that are passed in from docker-compose.yml.

COPY 00-opcache.ini /usr/local/etc/php/conf.d/
COPY 00-xdebug.ini /usr/local/etc/php/conf.d/
COPY .bashrc /root/
COPY supervisord.conf /etc/supervisor/conf.d/

These lines copy the files from the local host computer to a directory inside the php-fpm container.

RUN export TERM=xterm && \
    apt-get clean && apt-get update && apt-get install -y \
    apt-utils \
    apt-transport-https \
    ca-certificates \
    ctags \
    indent \
    curl \
    imagemagick \
    graphicsmagick \
    mysql-client \
    ...

In the Dockerfile the RUN instruction executes any commands in a new layer on top of the current image and commit the results. This resulting committed image will be used for the next step in the Dockerfile. You can use RUN to break the Dockerfile into steps.

The && ANDs commands together. So, RUN action1 && actions will run action1 and action2. The trailing \ on each line lets the Dockerfile know that the command continues on the next line.

# Change php fpm port
sed -i "s/listen = 127.0.0.1:9000/listen = 127.0.0.1:${PHP_FPM_PORT}/g" /usr/local/etc/php-fpm.d/www.conf && \
sed -i "s/listen = 127.0.0.1:9000/listen = 127.0.0.1:${PHP_FPM_PORT}/g" /usr/local/etc/php-fpm.d/www.conf.default && \
sed -i "s/#XDEBUG_IDE_KEY#/${XDEBUG_IDE_KEY}/g" /usr/local/etc/php/conf.d/00-xdebug.ini && \
sed -i "s/#XDEBUG_REMOTE_PORT#/${XDEBUG_REMOTE_PORT}/g" /usr/local/etc/php/conf.d/00-xdebug.ini && \

These lines do inline edits to change the fpm port to the port we specify in the .env file.

WORKDIR /var/www/${PROJECT_NAME}

Sets the directory that will be used when you log in.

CMD ["/usr/bin/supervisord"]

CMD runs a command inside the container. Here we are calling supervisord.

supervisord.conf

The supervisord.conf is used when we run the command above.

[program:script_1]
command=sed -i "s/listen = \[\:\:\]\:9000/listen = \[\:\:\]\:#PHP_FPM_PORT#/g" /usr/local/etc/php-fpm.d/zz-docker.conf

Makes sure that the port we have chosen for php fpm in our configuration file is used.

[program:sshd]
command=/usr/sbin/sshd -D

This starts the SSH server. Normally, you should not use SSH to access a container. But, if you are using windows, this is the best way to get full keyboard functionality (i.e. arrow keys). And, since this is a development environment, it should be no problem.

[program:php-fpm]
command=/usr/local/sbin/php-fpm -c /usr/local/etc/php-fpm.d/www.conf

Start php-fpm.

Now run:

$ docker-compose up --build -d

This will build and run our php-fpm service.

Name               Command                 State        Ports
-------------------------------------------------------------------------
mysqldb_1    docker-entrypoint.sh mysqld    Up     0.0.0.0:3306->3306/tcp
php-fpm_1    docker-php-entrypoint /usr     Up     0.0.0.0:2222->22/tcp,
                                                   0.0.0.0:9000->9000/tcp,
                                                   0.0.0.0:9001->9001/tcp

We now have a MySQL container and a php-fpm container that you can SSH into using port 2222 with the username:  root and password:  password.

In the next post, we will build the NGINX container.

MySQL – Docker Development Environment (DDE Part 4)

mysql

MySQL

Let’s start with creating a container for MySQL.

.cnf File

Let’s create a file called zz-mysqld.cnf  in the docker/mysql directory. This file will allow us to set database character sets and collation.

[mysqld]
character-set-server=#CHAR_SET_SERVER#
collation-server=#COLLATION_SERVER#

[client]
default-character-set=#DEFAULT_CHAR_SET#

Dockerfile

In the docker/mysql directory, create a file called Dockerfile. A Dockerfile is a text document that contains commands that a user could call on the command line to assemble the image. This allows us to automate our build and automatically execute command-line instructions.

The contents of the file should look like this:

FROM mysql:5.7
MAINTAINER Your Name <yourname@youremail.com>

ARG CHAR_SET_SERVER
ARG COLLATION_SERVER
ARG DEFAULT_CHAR_SET

COPY zz-mysqld.cnf /etc/mysql/mysql.conf.d

RUN sed -i "s/#CHAR_SET_SERVER#/${CHAR_SET_SERVER}/g" /etc/mysql/mysql.conf.d/zz-mysqld.cnf && \
    sed -i "s/#COLLATION_SERVER#/${COLLATION_SERVER}/g" /etc/mysql/mysql.conf.d/zz-mysqld.cnf && \
sed -i "s/#DEFAULT_CHAR_SET#/${DEFAULT_CHAR_SET}/g" /etc/mysql/mysql.conf.d/zz-mysqld.cnf

That’s it for our Dockerfile. Let’s look at the contents of this file.

FROM mysql:5.7
MAINTAINER Your Name <yourname@youremail.com>

This says that our container is going to be based on the official mysql repository on Docker Hub and that we are going to use version 5.7.

ARG CHAR_SET_SERVER
ARG COLLATION_SERVER
ARG DEFAULT_CHAR_SET

These are the arguments that we are going to pass into our container.

COPY zz-mysqld.cnf /etc/mysql/mysql.conf.d

This copies the file zz-mysqld.cnf that we created earlier to the /etc/mysql/mysql.conf.d directory in the container.

RUN sed -i "s/#CHAR_SET_SERVER#/${CHAR_SET_SERVER}/g" /etc/mysql/mysql.conf.d/zz-mysqld.cnf && \
    sed -i "s/#COLLATION_SERVER#/${COLLATION_SERVER}/g" /etc/mysql/mysql.conf.d/zz-mysqld.cnf && \
sed -i "s/#DEFAULT_CHAR_SET#/${DEFAULT_CHAR_SET}/g" /etc/mysql/mysql.conf.d/zz-mysqld.cnf

This runs three sed commands that do inline replacements to set our character set and collation.

Docker Hub

Before going any farther, let’s talk about Docker Hub tags.

mysql docker hub

If we take a look at the first line in the Dockerfile, FROM mysql:5.7mysql is the name of the Docker Hub repository image and the tag 5.7 is the version of the application. So, every time we build our mysql container we will get mysql 5.7. Using tags 5.7.17, 5.7, 5, and latest will also get mysql 5.7.

If we use the tag 5.7.17, we will build mysql 5.7.17. And, if we use use the tag 5, we will build the latest version of mysql that is less than version 6. By using 5.7 we are saying that every time we build our container, we will build the latest image that is less than 5.8.

Be careful when using the latest tag. Currently, this would get mysql 5.7 but, if the tag is moved to mysql 8, the next time you built the image you would get mysql 8.

Docker Store

Docker also has Docker Store. More information about Docker Store can be found in this blog post.

docker-compose.yml

Now, edit the docker-compose.yml file you created earlier. Here we will define the mysql service.

version: '2'

services:
    mysqldb:
        build:
            context: ./docker/mysql
            args:
                CHAR_SET_SERVER: ${CHAR_SET_SERVER}
                COLLATION_SERVER: ${COLLATION_SERVER}
                DEFAULT_CHAR_SET: ${DEFAULT_CHAR_SET}
        ports:
            - "${MYSQL_PORT}:3306"
        restart: always
        environment:
            MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
            MYSQL_DATABASE: ${MYSQL_DATABASE}
            MYSQL_USER: ${MYSQL_USER}
            MYSQL_PASSWORD: ${MYSQL_PASSWORD}
        volumes:
            - ./data/mysql:/var/lib/mysql

 This defines a service called mysqldb that uses the Dockerfile located in the myproject/docker/mysql directory that we created earlier, sets some arguments that are going to be passed to the Dockerfile, sets environment variables that will be used by the mysql container, and defines the ports and volumes that will be used by the host and the container.

            args:
                CHAR_SET_SERVER: ${CHAR_SET_SERVER}
                COLLATION_SERVER: ${COLLATION_SERVER}
                DEFAULT_CHAR_SET: ${DEFAULT_CHAR_SET}
        environment:
            MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
            MYSQL_DATABASE: ${MYSQL_DATABASE}
            MYSQL_USER: ${MYSQL_USER}
            MYSQL_PASSWORD: ${MYSQL_PASSWORD}

When Docker Compose reads this file, it will look at our .env file first to get any variables and their values. These variables and their values are then passed into our docker-compose.yml file. We can let Docker Compose know where to use those variables by using the format: ${VARIABLE_NAME}.

For example, in the above section, we are assigning the value “utf8” to the CHAR_SET_SERVER argument. We are also assigning values to the environment values needed by the MySQL image.

        ports:
            - "${MYSQL_PORT}:3306"

In order to keep a persistent database, we need to map it to a folder on the host computer. So, we will map the /var/lib/mysql directory on the container to the ./data/mysql directory to the host.

        volumes:
            - ./data/mysql:/var/lib/mysql

Run It!

You should now be able to run the mysql container with the following command:

$ docker-compose up --build -d mysqldb

 This builds the mysqldb container and starts it.

Note:  The -d flag will run the command and give you back the command line prompt.

Running:

$ docker-compose ps

should show that the container is running.

Name               Command                 State        Ports
-------------------------------------------------------------------------
mysqldb_1    docker-entrypoint.sh mysqld    Up     0.0.0.0:3306->3306/tcp

In the next post, we will create our PHP container.

Docker Development Environment – Build it (DDE Part 3)

docker

Next, we are going to create the services for our application. Before we start to build our Docker development environment, we need to set up a directory structure for the project.

The Directory Structure

First, create a directory to contain your project. In this series, this folder will be called myproject.

Inside the myproject directory, create the following folder structure:

  • myproject
    •  docker
      • mysql
      • nginx
        • conf.d
      • php-fpm
        • 5.6
        • 7.0

docker-compose.yml

Since we now have a basic directory structure, let’s create a file called docker-compose.yml in your myproject directory.

In this file add:

version: '2' 

services: 

The compose file is a YAML file that defines the services, networks, and volumes that we want to build and run. We will build out this file as we add our container services. So, you may want to keep this open.

.env

Next, create a file called .env in your myproject directory. Docker Compose will use this configuration file. Here is the contents of this file:

# The type of application.
# Determines which nginx conf file is used
# Valid values:  symfony or drupal8
APPLICATION_TYPE=symfony

# Project Information
# This will be the directory that the code is stored in.
# If you change this value, you also need to change the location in the logstash.conf file
PROJECT_NAME=project

# Domains. Connect to the server using these domain names.
DOMAIN_NAME=project.local
PHPMYADMIN_DOMAIN_NAME=phpmyadmin.local

# The name of the directory where web files are stored.
# Symfony usually is 'web' and Drupal is 'public'
WEBSITE_DIR=web

# The HTTP and HTTPS ports that will be used to connect to the sites.
HTTP_PORT=8080
HTTPS_PORT=4343

# MYSQL Settings
MYSQL_ROOT_PASSWORD=root
MYSQL_DATABASE=project
MYSQL_USER=docker
MYSQL_PASSWORD=docker
MYSQL_PORT=33060

CHAR_SET_SERVER=utf8
COLLATION_SERVER=utf8_unicode_ci
DEFAULT_CHAR_SET=utf8

# XDEBUG Settings
XDEBUG_IDE_KEY=PHPSTORM
XDEBUG_REMOTE_PORT=9000

# PHP-FPM. This should be different from xdebug
PHP_FPM_PORT=9001

# Timezone to use. i.e. Europe/Berlin
TIME_ZONE=US/Central

# SSH Port for clients to connect to
SSH_PUBLIC_PORT=2222

Now that we have a basic directory structure setup for our Docker development environment, our next step is to set up a MySQL container.

Docker Compose and Docker (DDE Part 2)

docker compose

Creating Docker Containers with the docker command

First, we are going to look at how to create a PHP/Apache web server and MySQL containers using the docker command. This is just a simple example of how to create Docker containers via command line. Later, we will use Docker Compose to simplify the creation of multiple containers.

PHP/Apache Container

Create a Dockerfile.

In a folder, create a file called Dockerfile that contains the following:

FROM php:7-0-apache
COPY src/ /var/www/html

Where the src/ directory is the directory on your computer that contains all of your PHP code.

Then, run the following commands to build and run the Docker image.

$ docker build -t my-php-app .
$ docker run -d --name my-app-name my-php-app

You should see something like the following when you run docker ps:

docker compose

Let’s stop the container:

$ docker stop my-app-name

MySQL Container

Now, let’s build a mysql 5.7 container and run it:

$ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.7

some-mysql is the name that you want to assign to your container, my-secret-pw is the password to ser for the MySQL root user. This image exposes the standard MySQL port (3306), so container linking makes the MySQL instance available to other application containers.

$ docker run --name some-app --link some-mysql:mysql -d my-php-app

Running docker ps, you should see something like:

docker compose

You can stop these by running:

$ docker stop some-app
$ docker stop some-mysql

Using Docker Compose

In the above example, every time you want to run the containers you would have to run:

$ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.7
$ docker run --name some-app --link some-mysql:mysql -d my-php-app

This may not be a problem with only a couple containers. But, as you add more containers, your list of commands grows. Luckily, there is Docker Compose.

Docker Compose is a tool for defining and running multi-container Docker applications. You use a docker-compose.yml file to configure your application’s services. Then, you can create and start all of your services using a single command.

Next time we will build our development environment using Docker Compose.

Docker Development Environment (DDE Part 1)

Doker Development Environment

Introduction

The goal of this series of posts is to give an overview of different development environments and how to setup a development environment using Docker.

This environment will consist of the following:

By the end of this series, you should also have a better understanding of how to setup your own Docker-based development environment and how to modify an existing one to meet your needs.

Development Environments

Local Machine

Getting up and running with a PHP, Apache and MySQL development environment is easy with applications like WAMP, XAMPP, or MAMP. You just download one of those applications, install it and you’re up and running. This setup is great when learning web development with PHP and want to get started quickly.

But, what if you want to want to develop using Ruby or Java? And, you want to experiment with different databases like MariaDB, PostgreSQL, or MongoDB? Then, of course, you want to use Composer, NPM, Gulp and Git. Pretty soon your local computer is a mess. The development environment quickly becomes hard to clean up, difficult to maintain, and, if something goes wrong or you need to work on an old project again, difficult to restore.

The Good

  • Setup is easy.
  • Easy to understand for novices.

The Bad

  • Difficult to maintain.
  • Difficult to restore.
  • Not good for teams:  Since each development environment is unique to each developer’s computer, you quickly start to hear, “Well, it works on my machine.”

Virtualbox and Vagrant

With Virtualbox (or VMware) and Vagrant, it is possible to run entire operating systems in a virtualized environment that is independent of the host system. By using a virtualized environment, a development environment can be setup to be identical to production server’s environment.

Each environment has its own virtual machine and is configured using a Vagrantfile. The Vagrantfile tells Vagrant how to set up the virtual machine and what scripts need to be run in order to provision the environment.

The Good

  • Relatively easy to understand and get up and running.
  • Each virtualized server can have its own configuration.
  • Can run on various host machines that are running different operating systems.
  • Scripts can be stored in a repository and shared so developers can have the same development environments.
  • Good online resources.

The Bad

  • Each virtual machine includes your application, all of its dependencies, all of its libraries, and the entire guest operating system.
  • Can be resource intensive in terms of CPU, RAM and disk space.
  • Bringing up new virtualized servers can be slow.

Docker

Docker uses “containers” which include your application and all of its dependencies, but share the operating system with other containers. These containers run as isolated processes on the host operating system but are not tied to any specific infrastructure. This means they can run on any computer.

Docker containers are modular and scalable. Therefore, you can break your application’s functionality out into separate containers. For example, you can have your NGINX web server running in one container and your MySQL database running in another container. Then, if you wanted to change the database to MariaDB, you could easily create and run a MariaDB container and connect to it.

Because there are many, many articles about Docker, we are not going to talk about the fundamental concepts of Docker. For a good Docker introduction, please read A Beginner-Friendly Introduction to Containers, VMs and Docker.

The Good

  • Uses less CPU, RAM, and, potentially, less disk space.
  • New servers can be created quickly:  Once a container is built, bringing up a new one can usually be run in seconds.
  • Modular and Scalable.
  • Can run on various host machines that are running different operating systems.
  • Scripts can be stored in a repository and shared so developers can have the same development environments.
  • Good online resources (i.e. Docker Hub).

The Bad

  • More difficult to understand at first.

Next Steps

To prepare for the next post in the series:

Web Hosting HostGator Review

HostGator Web Hosting Overview

HostGator is one of the world’s top 10 largest web hosting companies with more than 8,000,000 hosted domains. They have over 850 employees and provide around the clock support.

HostGator is known for making web hosting easy and affordable.

According to their website, “Every web hosting plan comes with a 45-day money back guarantee, 99.9% uptime guarantee, and is fully guaranteed by the CEO himself. If you ever have a problem with the regular support, just ask that your ticket be assigned to Adam and he will personally take the time to give you the VIP attention that you deserve.”

HostGator offers affordable hosting from just $3.95 a month and can really be classed as one of the cheapest web hosts on the internet.

Key Features

  • EASY Control Panel
  • 1-CLICK Script Installs
  • $100 Google AdWords Offer
  • $100 Yahoo!/Bing Credit
  • 4,500 Free Website Templates
  • 99.9% Uptime Guarantee
  • 45 Day Money Back Guarantee
  • 24/7/365 Technical Support

 

HostGator Review

Shared Hosting (Web Hosting Plans)

Hatchling Plan

Now 43% OFF!

  • Single Domain
  • One Click Installs
  • Unmetered Bandwidth
  • Shared SSL Certificate

Starting At $3.96/mo*

Baby Plan

Now 50% OFF!

  • Unlimited Domain
  • One Click Installs
  • Unmetered Bandwidth
  • Shared SSL Certificate

Starting At $4.95/mo* 

Business Plan

Now 40% OFF!

  • Unlimited Domain
  • One Click Installs
  • Unmetered Bandwidth
  • FREE Private SSL & IP
  • FREE Toll Free Number

Starting At $8.95/mo*

 

Sign Up Now!

 

Sign Up Now!

 

Sign Up Now!

Web Hosting Features

  • Flexible, Easy to Use Control Panel
  • Unmetered Bandwidth
  • Unlimited Sub Domains, FTP Accounts, and Email Accounts
  • 99.9% Uptime Guarantee
  • No Contract with a 45 Day Money Back Guarantee

Free With Each Hosting Plan

  • Free Weebly SiteBuilder and Website Building Tools
  • 4,500 Free Website Templates
  • Free Website Transfer, Domain Transfer, MySQL Transfer, Script Transfer
  • 52 Free scripts can be instantly installed on your account with a few clicks
  • $100 Google Adwords Offer
  • $100 Yahoo!/Bing Credit

cPanel Control Panel

  • Latest cPanel Control Panel
  • Website Statistics: AWStats, Webalizer, Raw Log Manager, Referrer and Error Logs
  • Instant Shopping Carts, Blogs, Portals, Forums, Counters, and Formmail
  • Password Protected Directories and Custom Error Pages
  • Web Based File Manager, Hotlink Protection, IP Deny Manager, Redirect URL

Programming & Databases

  • Unlimited MySQL Databases with phpMyAdmin Access
  • Programming Language: CGI, Fast CGI, PHP 5, Ruby on Rails, Perl, Python, SSL
  • Programming Modules: Curl, CPAN, GD Library, ImageMagick
  • System Management: SSH Access and Cron Job Scheduling

Email Features

  • Unlimited POP3 Email Accounts with SMTP
  • WebMail Access: Horde, SquirrelMail, RoundCube
  • Receive your email to your phone via IMAP Support
  • Prevent spam with SpamAssassin
  • Unlimited Autoresponders, Mail Forwards, Email Aliases, 25 Mailing Lists

Award-Winning Support

  • 24/7/365 Premium Support via Phone, Live Chat, and Ticket System (Email)
  • Automatic Weekly Off-Site Data Backups
  • 24/7/365 Server Monitoring
  • Online Support Portal with over 500+ Video Tutorials and 680+ Help Articles
  • HostGator Community Forum Access

Application Hosting

  • Instantly install over 75 open-source scripts with just a click!
  • WordPress Hosting – Host your very own WordPress blog
  • Joomla Hosting & Drupal Hosting – Professional CMS Solutions
  • Magento Hosting – Free E-commerce platform for your own store
  • Wiki Hosting – Start a Wiki web site with MediaWiki

Green Web Hosting

  • We’ve invested in Wind Energy to help offset server emissions
  • Climate Friendly, Wind Powered, Certified RECs
  • HostGator purchases certified Renewable Energy Credits (REC’s)

 

HostGator Review

Virtual Private Server (VPS) Hosting

A HostGator VPS is completely customizable and can be upgraded anytime as your site grows. Full root access allows you total control, as well as the ability to install advanced software and completely customize your hosting environment. It truly is dedicated functionality without the expense.

The New HostGator VPS

  • With full root access, you are able to install and customize any software that you need to optimize your hosting experience.
  • All HostGator VPS servers utilize 32-Core AMD Opteron 6376 processors, 128GB of RAM, and 3.6TB of RAID 10 storage.
  • 24/7/365 via Telephone, LiveChat, and Email to assist with any questions you may have.

Fully or Semi-Managed Servers

Offers both fully-managed and semi-managed VPS plans in order to best meet your needs. Semi-managed plans do not include a hosting control panel but, do include assistance with any hardware, operating system, or basic configuration issues.

Fully-managed plans include assistance with just about any issue or configuration request you may have, outside of custom software/script installations.

Technical specifications

HostGator’s Linux VPS Hosting is a good bridge between shared hosting and dedicated servers. VPS plans can be completely customized to match your specific hosting needs and upgraded anytime as your site grows.

This is a good option that allows you to start small but still provides the ability to scale up very quickly.

With full root access, you’re able to install advanced software and completely customize virtually anything as if your VPS were a dedicated server without the cost of one. For easy administration, cPanel is available.

  • UNLIMITED Domains
  • UNLIMITED Sub Domains
  • UNLIMITED Email Accounts
  • UNLIMITED MySQL Databases
  • WEEKLY Off Site Backups
  • UNLIMITED FTP Accounts
  • FREE Site Builder Software*
  • PRIVATE Name Servers
  • FULL Root Access
  • 24/7/365 Award-Winning Support
  • FULLY Managed (w/ cPanel)*

VPS Server Features

  • CentOS Linux with Full Root Access (64-bit with 32-bit Compatibility)
  • Optional cPanel with WHM Control Panel
  • Apache Web Server (Must be installed by user on semi-managed plans)
  • Supports: MySQL, PHP, Perl, Python (Django), Ruby (on Rails), FFMpeg
  • Secure VPS with free IPTables Firewall
  • Ability to install and customize applications
  • Seamless kernel upgrades utilizing KSplice Uptrack
  • Safe Harbor Certified

Free With Each VPS Plan

  • Free SiteBuilder Website Building Tool
  • 4,500 Free Website Templates
  • Free Website Transfer, Domain Transfer, MySQL Transfer, Script Transfer
  • Free Reseller Club Domain Reseller Account
  • 52 Free scripts can be instantly installed on your account with a few clicks

Cutting Edge Server Hardware

  • Supermicro Servers
  • Fully Customized Hardware Specs
  • AMD Opteron 6000 series CPUs
  • Fault Tolerant RAID Disk Arrays
  • DDR3 ECC RAM

Top Of The Line Network

  • Gigabit uplink with a guaranteed 20mbit connection
  • Fully redundant network with no single point of failure
  • Multiple layers of network security
  • Multiple bandwidth providers (AboveNet, ATT, Comcast, Global Crossing, Level(3), NTT)
  • State of the art Data Center with backup power generators and HVAC units.
  Snappy 500 Snappy 1000 Snappy 2000 Snappy 4000 Snappy 8000
CPU 0.5 core 1 core 2 core 2 core 4 core
RAM 512 MB 1000 MB 2000 MB 4000 MB 8000 MB
Disk Space 25 GB 60 GB 120 GB 165 GB 240 GB
Bandwidth 0.5 TB 1 TB 1.5 TB 2 TB 3 TB
IP Addresses 2 IPs 2 IPs 2 IPs 2 IPs 2 IPs
First Term $11.97/mo* $33.97/mo* $57.97/mo* $81.97/mo* $99.97/mo*
Recurring $19.95/mo $49.95/mo $89.95/mo $129.95/mo $159.95/mo
  Sign Up Now! Sign Up Now! Sign Up Now! Sign Up Now! Sign Up Now!

 

HostGator Review

WordPress Hosting

Sleek, Simple And Secure WordPress Sites

Supercharged Speed: Up to 2.5X Faster with Managed Hosting

HostGator’s WordPress platform bundles scalable cloud hosting and robust functionality, empowering your sites to run faster and more securely than ever before.

Easy to Use

The managed WordPress platform handles your site administration. HostGator automatically updates the software and all installed plugins, and apply the latest security patches and feature upgrades. You can count on our expertise. HostGator’s managed hosting solution includes everything you need to optimize WordPress. Easy access to individual file and database restores and email accounts through a single portal means you’ll have more time to do what you want. HostGator handles the technical stuff and free you up to follow your passion.

Advanced Security

Malicious malware can wreak havoc on your website and your business reputation. That’s why HostGator scans your site daily and automatically remove any detected malware. For added security, the managed WordPress hosting platform automatically backs up your entire site daily to an offsite location to ensure that your data is always available.

Flexible

HostGator’s Optimized WP’s cloud architecture scales with your business. See or anticipate a spike in traffic? Depending on the plan you choose, your site will have the power to scale instantly with minimal downtime. The managed WordPress hosting platform delivers optimal features and maximum value compared to other WordPress hosting plans.

Support Available 24x7x365

Have questions about your managed WordPress hosting platform? Get real-time answers from HostGator Optimized WP experts who are always available by phone.

Plans For Every WordPress User

Get Optimized WP Today!

 

Starter

$5.97/mo*

40% Off!

Standard

$8.77/mo*

45% Off!

Business

$13.98/mo*

50% Off!

Max Sites

1

2

5

Monthly Average Site Traffic

100,000

200,000

500,000

Relative Compute Power

2X

2X

5X

100% FREE Migration

Up to1 site

Up to 2 sites

Up to 5 sites

WPPro Developer Help

     

WPBeginner Walkthrough

     

Automated Daily Database Backups,
Including File-Level Restore

1GB

2GB

5GB

Automatic Malware Removal

     

Email Accounts

Unlimited

Unlimited

Unlimited

Storage Space

Unlimited

Unlimited

Unlimited

Google Adwords Credit*

$100

$100

$100

SSL Certificate

Shared

Shared

Shared

 

Starter

$5.97/mo*

40% Off!

Minimalist Control Panel Designed

Specifically For WordPress

  • A WordPress Cloud Interface focused on usability, minimizing the complexities of traditional web hosting
  • Auto-backup with one-click restores; configurable for full or snapshot backups 
  • One-click scalability to handle traffic spikes and increased capacity requirements 
  • Easy access to all your email accounts

Free Migration & All The Help You Need

FREE migration service will transfer your existing WordPress site to HostGator. Need help? Learn from HostGator’s WordPress experts. Consultation services are included with some plans.

Get valuable tips and tools within the managed hosting platform, including easy access to popular WordPress templates in MOJO Marketplace.

HostGator Review

Cloud Hosting

  • Experience up to 2X faster load times due to low-density servers, premium hardware, and multiple caching layers
  • Your website content is managed more efficiently, enabling dynamic content requests to be processed lightening-fast
  • Ramp up your cloud resources as your online presence grows. One simple click is all you need—no data migrations, downtime or reboots
  • Rest easy knowing that you can respond to those large traffic spikes without any service interruption

Stats At A Glance

  • Effortlessly understand your site’s performance via an intuitive dashboard
  • Simple yet useful dashboard tools provide a quick view of usage trends, page download speed, uptime, global reach, and more
  • With instant resource management, you no longer need to rely on a system admin or advanced coding knowledge to maintain your cloud-hosted site

Hatchling Cloud

Up To 30% OFF!

  • Single Domain
  • 2GB Memory
  • 2 Core CPU
  • Shared SSL Certificate
Starting At $6.26/mo*

Baby Cloud

Up To 30% OFF!

  • Unlimited Domains
  • 4GB Memory
  • 4 Core CPU
  • Shared SSL Certificate
Starting At $8.36/mo*

Business Cloud

Up To 30% OFF!

  • Unlimited Domains
  • 6GB Memory
  • 6 Core CPU
  • FREE Private SSL & IP
Starting At $12.56/mo*

Sign Up Now!

Sign Up Now!

Sign Up Now! 

Cloud Features

Integrated Caching

Your page will load faster from the cloud due to an optimal caching configuration, custom-built for speed!

Intuitive Dashboard

Manage and track your site’s performance, gather information, and keep an eye on all your important metrics.

Resource Management

Monitor and allocate additional resources easily. You have total control over your usage, with no surprises.

Automated Failover

If a hardware issue arises, your site is automatically switched to another server.

Data Mirroring

Cloud hosting automatically distributes three mirrored copies of your data across multiple devices to ensure safety and redundancy.

cPanel

Create new email accounts, manage subdomains, and so much more, all with the click of a button.

 

HostGator Review

Dedicated Hosting

Basic

Now 56% OFF

  • Intel Xeon Dual Core 2.3GHz (4 threads)
  • 100 Mbps Uplink
  • 4 GB RAM
  • 500 GB RAID-1 Drives
  • 10 TB Bandwidth
  • 2 Dedicated IPs

 

$76.56/mo*

Standard

Now 58% OFF

  • Intel Xeon Quad Core 2.5GHz (8 threads)
  • 250 Mbps Uplink
  • 4 GB RAM
  • 1,000 GB RAID-1 Drives
  • 15 TB Bandwidth
  • 3 Dedicated IPs

 

$91.98/mo*

Elite

Now 63% OFF

  • Intel Xeon Quad Core 2.5GHz (8 threads)
  • 500 Mbps Uplink
  • 8 GB Ram
  • 1,000 GB RAID-1 Drives
  • 20 TB Bandwidth
  • 4 Dedicated IPs

 

$103.23/mo*

Pro

Now 69% OFF

  • Intel Xeon Quad Core 3.3GHz (8 threads)
  • 1 Gbps Uplink
  • 16 GB RAM
  • 1,000 GB RAID-1 Drives
  • 25 TB Bandwidth
  • 5 Dedicated IPs

 

$115.94/mo*

Sign Up Now!

Sign Up Now!

Sign Up Now!

Sign Up Now!

HostGator Dedicated Servers

A dedicated service is a good solution for larger businesses and high-traffic websites. Dedicated servers allow for maximum customization, configuration, installation, and overall flexibility; all backed by HostGator’s unparalleled support.

Tools

A HostGator dedicated server is not just a server, it’s everything you need to maximize and optimize the hosting experience for yourself and your visitors or clients. All the necessary tools are included, from the hosting control panel down to the application installers and website building tools.

Control Panels

All dedicated servers include cPanel / WHM for total control over your server.

Billing Systems

WHMCS or WHM AutoPilot are included to fully automate your billing needs.

Technical Specifications

A HostGator Dedicated Server is more than just a server, it is a fully managed solution designed to take your business to the next level. As an added bonus, HostGator includes cPanel for free with every dedicated server. Your server will be provisioned, secured, and typically delivered within 24 hours of purchase.

Having a dedicated server will provide your sites with a higher level of security, speed, and uptime. You will have the capability to go far beyond the resource limitations found in a shared hosting environment.

 Linux Dedicated Server Features

  • CentOS Linux with Full Root Access (64-bit with 32-bit available on request)
  • cPanel with WHM Control Panel
  • Apache Web Server, MySQL, PHP, Perl, Python, Ruby (on Rails), FFMpeg Support
  • Secured Server with IPTables Firewall

Free With Each Hosting Plan

  • Create Sitebuilder Account for your Customers
  • Free Reseller Club Domain Reseller Account
  • Dedicated Servers receive up to 100 free transfers** within 30 days of account activation
  • Provide Customers with 4,500 Website Templates

 cPanel Control Panel

  • Latest cPanel Control Panel
  • Website Statistics: AWStats, Webalizer, Raw Log Manager, Referrer and Error Logs
  • Quickinstall: Instant Shopping Carts, Blogs, Portals, Forums, Counters, Formmail
  • Password Protected Directories and Custom Error Pages
  • Web Based File Manager, Hotlink Protection, IP Deny Manager, Redirect URL

 WHM Control Panel

  • Latest WHM Control Panel with Multi-language Availability
  • Complete Control of all Server Settings, Services, and Accounts
  • Quickinstall Installation Management
  • Reseller Management
  • Brandable Control Panel with your Company Logo

 Programming And Databases

  • Unlimited MySQL Databases with phpMyAdmin Access
  • Programming Language: CGI, Fast CGI, PHP 5, Ruby on Rails, Perl, Python, SSI
  • Programming Modules: Curl, CPAN, GD Library, ImageMagick
  • System Management: SSH Access and Cron Job Scheduling

Email Features

  • Unlimited POP3 Email Accounts with SMTP
  • WebMail Access: Horde, SquirrelMail, RoundCube
  • Receive your email to your phone via IMAP Support
  • Prevent spam with SpamAssassin
  • Unlimited Autoresponders, Mail Forwards, Email Aliases, 25 Mailing Lists

 

 Top Of The Line Network

  • Fully Redundant Network with NO Single Point of Failure
  • Multiple Layers of Network Security
  • Multiple Bandwidth Providers (AboveNet, ATT, Comcast, Global Crossing, Level(3), NTT)
  • State of the Art Data Center with Backup Power Generators and HVAC Units.

Award-Winning Support

  • 24/7/365 Premium Support via Phone, Live Chat, and Ticket System (Email)
  • 24/7/365 Server Monitoring
  • Online Support Portal with over 500+ Video Tutorials and 680+ Help Articles
  • HostGator Community Forum Access

 

HostGator Review

Reseller Hosting

Make Money By Hosting Your Own Clients!

A HostGator reseller plan is a great way for you to earn money on the side, or even become your own full-time web hosting company. Acquire your own hosting clients, or if you’re a web designer you can use a reseller plan to add value for your existing and future customers.

Start Your Own Business!

A HostGator’s reseller plan provides you with everything necessary to start your own web hosting company. WHM allows you to create cPanels for each of your clients, and your choice of WHMCS or WHM Autopilot facilitates the billing aspect.

Powerful Tools

Reseller plans include everything you need to succeed, from WHM to billing software.

Flexibility

You control the overall resource allocation to best fit your clients’ needs.

Scalability

It is always free and easy to upgrade; your hosting grows as your business grows.

Most Importantly, You Can Run Your Own Business!

A HostGator Reseller hosting plan gives you complete control over every aspect of your hosting business, from resource allocation to payment methods and what (if any) additional services you choose to provide your clients (domains, SSL certificates, etc.).

Technical Specifications

Reseller Hosting Features

  • Unmetered Domains, Subdomains, Email Accounts, MySQL Databases, FTP Accounts
  • Flexible, Easy to Use Control Panel
  • 99.9% Uptime Guarantee
  • No Contract with a 45 Day Money Back Guarantee
  • Private Name Servers based on your Domain
  • Safe Harbor Certified

Free With Each Reseller Plan

  • Free WHMCS or WHM AutoPilot Client Management / Billing software
  • Create SiteBuilder Accounts for Your Customers
  • Free Website Transfers for up to 30 websites
  • Provide your customers over 4,500 Website Templates
  • 400+ Brandable Video Tutorials for Your Clients

WHM Control Panel

  • Latest WHM Control Panel with Multi-language Availability
  • Monitor Server Status
  • Limit packages, specify disk space, bandwidth, email, databases, and other features
  • Complete Control: Password Modification, DNS, Account Creation / Termination
  • Brandable Client Panel with your company logo

cPanel Control Panel

  • Latest cPanel Control Panel
  • Website Statistics: AWStats, Webalizer, Raw Log Manager, Referrer and Error Logs
  • Instant Shopping Carts, Blogs, Portals, Forums, Counters, and Formmail
  • Password Protected Directories and Custom Error Pages
  • Web Based File Manager, Hotlink Protection, IP Deny Manager, Redirect URL

Programming & Databases

  • Unlimited MySQL Databases with phpMyAdmin Access
  • Programming Language: CGI, Fast CGI, PHP 5, Ruby on Rails, Perl, Python, SSL
  • Programming Modules: Curl, CPAN, GD Library, ImageMagick
  • System Management: SSH Access and Cron Job Scheduling
  • FrontPage Extension

Email Features

  • Unlimited POP3 Email Accounts with SMTP
  • WebMail Access: Horde, SquirrelMail, RoundCube
  • Receive your email to your phone via IMAP Support
  • Prevent spam with SpamAssassin
  • Unlimited Autoresponders, Mail Forwards, Email Aliases, 25 Mailing Lists

Award-Winning Support

  • 24/7/365 Premium Support via Phone, Live Chat, and Ticket System (Email)
  • Automatic Weekly Off-Site Data Backups
  • 24/7/365 Server Monitoring
  • Online Support Portal with over 500+ Video Tutorials and 680+ Help Articles
  • HostGator Community Forum Access

Green Web Hosting

  • HostGator has invested in Wind Energy to help offset server emissions
  • Climate Friendly, Wind Powered, Certified RECs
  • HostGator purchases certified Renewable Energy Credits (REC’s)

Free Reseller Club Account

  • 70+ gTLDs & ccTLDs to resell
  • Transfers at cost & up to 80% off on Registrations
  • 700+ New gTLDs from a single account
  • Easy Integration through WHMCS, API or Storefront
 
  Aluminium Copper Silver Gold Diamond
Disk Space 50 GB 80 GB 120 GB 160 GB 200 GB
Bandwidth 500 GB 700 GB 1000 GB 1200 GB 1400 GB
Domains Unlimited Unlimited Unlimited Unlimited Unlimited
First Month 19.96/mo* 27.96/mo* 39.96/mo* 59.96/mo* 79.96/mo*
Recurring 24.95/mo 34.95/mo 49.95/mo 74.95/mo 99.95/mo
 

Sign Up Now!

Sign Up Now!

Sign Up Now!

Sign Up Now!

Sign Up Now!

The HostGator Network

HostGator maintains servers throughout multiple geographic locations in order to provide flexibility, reliability, quality, and performance.

HostGator Guarantee

24/7/365 Support

Available 24/7/365 to assist you via Telephone, LiveChat, or Email with any hosting-related issues.

45 Day Guarantee

Try their services at no risk! If you’re not completely satisfied, you can cancel within 45 days for a complete refund.

99.9% Uptime

The availability of your website.

 

* Please visit HostGator for more details. And, as always, this review is for general information about the hosting provider. Please make sure to read all of the information that is on the hosting provider’s site.

DisclosureWe are a professional review site that receives compensation from the companies whose products we review. We test each product thoroughly and give high marks to only the very best. We are independently owned and the opinions expressed here are our own.

Sales and Promotions – Saving You Money

February 2016 Sales and Promotions

Are you building your online presence and want to save some money? You’ve come to the right place! Check out these sales and promotions.

Keep checking here for ways to save money or subscribe to our mailing list.

ServerMania

Lower Your Server Costs with Hybrid Smart Servers. Businesses require speedy delivery of server instances to be able to quickly and easily scale their hosted environments. Hybrid Smart Servers were designed for ease of use, maximum uptime and with your business in mind.

15% off New Hybrid Smart Servers (1st month)

15% off New Hybrid Smart Servers. Use promo code: HYBRID15

Lower Your Server Costs with Hybrid Smart Servers – from $49

Valid: 1/20/16-2/20/16

Our slogan – “Hosting Empowered” – reflects our dedication to the needs of the clients, our devotion to equipping them with all the resources they need to put themselves ahead of the competition. Backed by our powerful Surge platform, our Cloud, VPS, Dedicated, and Web Hosting solutions can be deployed in as little as five minutes. We offer services in four state-of-the-art data centers situated across the United States.

  • 24×7 Support Fleet
  • DDoS protected servers
  • 15 Min. Response Time
  • 100% Uptime SLA
  • Custom Quote Request