๐Ÿ” Secure and ๐Ÿค‘ budget-friendly Wordpress setup for your digital garden ๐Ÿก

Last update: May 11, 2022

wordpress-deploy

๐Ÿš€ Deploy wordpress sites to $5 servers in a few minutes ๐Ÿš€

Install | Deploy a site | Configuration options | FAQs


Use this to setup blogs for your family or landing pages for your side-projects. (Hint: Gutenberg editor Full Site Editing is ๐Ÿ”ฅ )

  • ๐Ÿ˜ Easy to configure
  • ๐Ÿ’ฐ Budget-friendly setup. Stuff as many sites as you can on your $5 server.
  • โ™ป๏ธ Automated weekly backups by email + daily backups on server (docs)
  • ๐Ÿ’ช Firewall protection with ufw
  • โšก๏ธ Pre-installs WP Super Cache for speed optimization
  • ๐Ÿงช Tested on DigitalOcean
  • โ›‘ Wordpress update email alerts ( ๐Ÿ‘จโ€๐Ÿ’ป Coming soon)
  • ๐Ÿ‘ฎโ€โ™€๏ธ Server monitoring with email alerts ( ๐Ÿ‘จโ€๐Ÿ’ป Coming soon)

You still need to enable disk backups with your cloud provider.

Install

Install python3 and clone this repository.

git clone https://github.com/HashNuke/wordpress-deploy.git wordpress-deploy
cd wordpress-deploy

# Install pipenv
pip3 install pipenv

# Install python dependencies
pipenv install

# Start a python virtual environment
pipenv shell

Deploy a site

Please follow the same order of instructions to avoid issues.

[Step-1] Create a server with Ubuntu 20.04 (LTS) on your cloud provider

Ensure to choose SSH key as the authentication method and add the SSH key to your local SSH key agent.

ssh-add ~/.ssh/mykey

[Step-2] Add DNS records for domain/subdomains

  • Domain/subdomain for the website.
  • Domain/subdomain for email notifications (backup emails, alerts, etc). Add an A-record for this.

These two can be the same domain/subdomain.

[Step-3] Add a server to the hosts file

Create a hosts file with the name of the server and IP address like below. I've named my server as personal, but you can name it whatever.

[personal]
1.2.3.4

[Step-4] Create a config file in the sites dir

cp sites/sample.yml sites/mysite.yml

The sample config file has details about configuration options. Give it a read.

[Step-5] Deploy

ansible-playbook setup.yml -i hosts --extra-vars @sites/mysite.yml

๐Ÿ‘‰ Login credentials + New site checklist ๐Ÿ˜ƒ

The wordpress admin user will receive an email with login credentials for the admin user. This email also includes a checklist for your new site.

[IMPORTANT] If you do not find this email in your inbox, please check your spam folder. And if you still do not find it then check the instructions below the screenshot.

Post-install email with instructions

Find default password for admin user

If you do not get an email after setting up a new site, then you can still access the password for the admin user. The default password is stored as a file on the server.

Assuming your site_name is "mysite" and deploy_user is "deployer" (default value), your default wordpress admin password can be found at the following path on the server.

/home/deployer/sites/mysite/config/default-password

More documentation

License

Copyright (C) 2022 Akash Manohar John
Check the LICENSE file for more info.

GitHub

https://github.com/HashNuke/wordpress-deploy
You might also like...

Developers tool for WordPress plugins: Wraps all your projects dependencies in your own namespace

Developers tool for WordPress plugins: Wraps all your projects dependencies in your own namespace, in order to prevent conflicts with other plugins loading the same dependencies in different versions.

May 20, 2022

Wordless is a junction between a WordPress plugin and a theme boilerplate that dramatically speeds up and enhances your custom theme creation

Wordless is a junction between a WordPress plugin and a theme boilerplate that dramatically speeds up and enhances your custom theme creation

Wordless is a junction between a WordPress plugin and a theme boilerplate that dramatically speeds up and enhances your custom theme creation. Some of

May 14, 2022

A foundation for WordPress Plugin Development that aims to provide a clear and consistent guide for building your plugins.

WordPress Plugin Boilerplate A standardized, organized, object-oriented foundation for building high-quality WordPress Plugins. Contents The WordPress

May 21, 2022

โ“ A WordPress plugin to display your site's environment type in the admin bar

Where A WordPress plugin to display your site's environment type in the admin bar. Available Filters where_env_should_add_env_type - Defaults to true

Mar 29, 2022

A Wordpress plugin that allows you to customize a news feed on your home page

=== Plugin Name === Contributors: Noora Chahine Requires at least: 4.0.1 Tested up to: 5.4 Stable tag: 5.2 License: GPLv2 or later License URI: http:/

Nov 15, 2021

A simple little WordPress block that allows you add social share icons to your website.

A simple little WordPress block that allows you add social share icons to your website.

Social Sharing Block This plugin requires WordPress 5.9+ or 5.8+ with Gutenberg active. A simple little block that allows you to add social share icon

Feb 17, 2022

This WordPress Plugin Boilerplate is meant for you to develop your own plugin on.

WordPress Plugin Boilerplate This plugin boilerplate is meant for you to develop your own plugin on. Support & collaboration Features OOP plugin core

May 10, 2022

๐Ÿš€WordPress Plugin Boilerplate using modern web techs like TypeScript, SASS, and so on... on top of a local development environment with Docker and predefined GitLab CI for continous integration and deployment!

๐Ÿš€WordPress Plugin Boilerplate using modern web techs like TypeScript, SASS, and so on... on top of a local development environment with Docker and predefined GitLab CI for continous integration and deployment!

WP React Starter: WordPress React Boilerplate DEPRECATED: WP React Starter was a "research project" of devowl.io for the development of our WordPress

May 22, 2022

Scaffold plugin for creating and managing Blocks, Block Patterns, Block Styles and Block Editor Sidebars in the WordPress Block Editor (aka Gutenberg).

Scaffold plugin for creating and managing Blocks, Block Patterns, Block Styles and Block Editor Sidebars in the WordPress Block Editor (aka Gutenberg).

WordPress Block Editor Scaffold This project is a template repo for developing WordPress Blocks, Block Patterns, Block Styles and Block Editor Sidebar

Feb 19, 2022
Comments
  • 1. Post-install email

    Email the user post install with the following content (below line). The example below only denotes negative scenarios for certain checks.

    Subject: New wordpress site at example.com


    Hello fellow human, Your new site "hello-world" has been setup to be served at https://example.com.

    Please take some time to read this email. It has been hand-crafted to help you with your new site.

    ๐Ÿงช New site checklist

    ๐Ÿ‘‰ [IMPORTANT] Add this email address to your contacts

    This will ensure that your email provider does not mark these emails as spam. These are emails from your own server. If you need help, then please check this page

    โœ… DNS record for email notifications (mailman.example.com)

    The A-record for mailman.example.com was added in the DNS appropriately. Your emails will work fine.

    โŒ DNS record for domain (example.com)

    Please ensure to set a DNS record for example.com to point to TODO IP address. If you have already added it, do not worry, it might take a while to propagate through the internet.

    โŒ DNS record for redirect domain (www.example.com)

    Please ensure to set a DNS record for www.example.com to point to TODO IP address. If you have already added it, do not worry, it might take a while to propagate through the internet.

    ๐Ÿ‘‰ Set a new password

    We set "TODO" as the site's password for you. Please login at [TODO admin link] and set a new password.

    โœ… Backups configured

    You will receive email backups of your site on TODO notify_email.

    As an example, we created your first backup and attached it along with this email. The instructions to restore sites are available on this page

    โค๏ธ Loved using this project?

    Here are some things you could do:

    • Tweet @HashNuke to let me know about your new site. I would love to hear about them.
    • Please share this project with other people - https://github.com/HashNuke/wordpress-deploy
    • Or if you are feeling lazy, just retweet this ๐Ÿ˜ƒ

    ๐Ÿ‘‹ Enjoy your new site

    And again, don't forget to set a new password ๐Ÿ™

    Reviewed by HashNuke at 2022-04-12 04:27
  • 2. Test deployment on the cheapest vultr virtual server

    Test deployment on vultr server

    • There is a Vultr VPS for $2.5/month - https://www.vultr.com/pricing/#cloud-compute
    • To find this server, look for the "Regular performance" category under their Cloud Servers.
    Reviewed by HashNuke at 2022-04-12 03:34
  • 3. v1 feature set

    Check if user is passing a config file with proper host and root user

    • [ ] Is a valid server available?
    • [ ] Is configuration available for the site name passed?

    Install and configure packages

    • [x] Install basic packages and create deployer user
    • [x] Install PHP, Nginx, MySQL from reliable sources

    Install site

    • [x] Create a directory for the site and download the Wordpress release
    • [x] Create a mysql database for the site

    Backups

    • [ ] Script for wordpress export (wrx file)
    • [x] Script for tar export with SQL dump and wordpress dir included
    • [x] Backup email alert with attached files
    • [x] Cron job to schedule the backup

    Monit email alerts

    • [ ] Memory 80% alert
    • [ ] When diskspace is 80%
    • [ ] Process alerts for nginx, mysql and fastcgi

    Security & optimization

    • [x] wp-config.php
    • [ ] fail2ban
    • [x] ufw
    • [x] WP Super Cache

    Upgrades

    • [ ] Script to check for Wordpress version of sites on server and mail user
    • [ ] Setup cron job to run script every 7 days
    Reviewed by HashNuke at 2022-04-12 03:05
The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone.

Pronamic WordPress Basecone The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone. Table of contents Au

Oct 19, 2021
A curated list of Awesome WordPress Theme, Plugins and Framework development Resources and WordPress Communities.

Awesome WordPress A curated list of Awesome WordPress Theme, Plugins and Framework development Resources and WordPress Communities. Inspired by bayand

Mar 25, 2022
A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings.
A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings.

Suspend WP A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings. ?? Demo (coming so

Nov 15, 2021
Laravel Blog Package. Easiest way to add a blog to your Laravel website. A package which adds wordpress functionality to your website and is compatible with laravel 8.
Laravel Blog Package. Easiest way to add a blog to your Laravel website. A package which adds wordpress functionality to your website and is compatible with laravel 8.

Laravel Blog Have you worked with Wordpress? Developers call this package wordpress-like laravel blog. Contact us for any customization: [email protected]

May 16, 2022
A WordPress plugin to re-use the same domain name for both your website and your Rebrandly links
A WordPress plugin to re-use the same domain name for both your website and your Rebrandly links

By installing this plugin and configuring it to connect with your Rebrandly account, you will be able to create branded links using the same domain yo

Jan 19, 2022
A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.

WP Bootstrap Navwalker This code in the main repo branch is undergoing a big shakeup to bring it in line with recent standards and to merge and test t

May 18, 2022
Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.
Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.

Twenty Twenty-Two Welcome to the development repository for the default theme that will launch with WordPress 5.9. About Twenty Twenty-Two is designed

May 25, 2022
Easy handle APlayer on WordPress. A shortcode for WordPress to using APlayer.

Description Easy handle APlayer on WordPress. A shortcode for WordPress to using APlayer. Support [audio] tag, compatible with AMP. Requirement WordPr

Sep 13, 2021
WordPress plugin that lets you use Discourse as the community engine for a WordPress blog

WP Discourse Note: the wp-discourse plugin requires >= PHP-5.4.0. The WP Discourse plugin acts as an interface between your WordPress site and your Di

May 2, 2022
WordPress & TypeScript. Simple starter template for WordPress projects

WordPress & TypeScript. Simple starter template for WordPress projects that want to use TypeScript in combination with @wordpress/scripts

May 23, 2022