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

Overview

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.
You might also like...
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

A PHP client for Wordpress websites that closely implement the XML-RPC WordPress API

Wordpress XML-RPC PHP Client A PHP client for Wordpress websites that closely implement the XML-RPC WordPress API Created by Hieu Le MIT licensed. Cur

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.

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

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

โ“ 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

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:/

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

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

Comments
  • Post-install email

    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 ๐Ÿ™

    opened by HashNuke 1
  • Test deployment on the cheapest vultr virtual server

    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.
    opened by HashNuke 1
  • v1 feature set

    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
    opened by HashNuke 1
Owner
Akash Manohar
Created asdf version manager, Heroku Buildpack for Elixir and a few other things.
Akash Manohar
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

Pronamic 1 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

Dropndot Limited 91 Dec 26, 2022
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

Waren Gonzaga 3 Nov 15, 2021
Simple WordPress plugin to learn how to understand WordPress Crons and the Action Scheduler library.

Simple WordPress plugin to learn how to understand WordPress Crons and the Action Scheduler library. Import Jamendo playlists with tracks in WordPress posts.

Pierre Saikali 3 Dec 7, 2022
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: contact@binsh

Binshops 279 Dec 28, 2022
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

null 3 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

WP Bootstrap 3.3k Jan 5, 2023
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

null 414 Nov 28, 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

Karl Chen 24 Nov 3, 2022
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

Discourse 497 Dec 10, 2022