GithubHelp home page GithubHelp logo

baby636 / wordpress-lockdown Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dkrusky/wordpress-lockdown

1.0 0.0 0.0 6.37 MB

This is a fork of Wordpress preconfigured to be locked down.

License: Other

ApacheConf 0.02% PHP 72.37% JavaScript 17.25% CSS 10.36% Shell 0.01%

wordpress-lockdown's Introduction

WordPress Lockdown

This is a full installation of WordPress with the following changes :

  • All the "twentyxxxxxxx" themes are removed
  • Default plugins "akismet" and "hello dolly" are removed
  • The wp-content folder is renamed to assets
  • Language support is enabled and set to en_CA by default. Lang files are stored in lang
  • uploads folder is renamed to media.

Several methods were used to make it easier to secure your wordpress installation as follows :

Updated wp-config-sample.php

You should copy wp-config-sample.php to wp-config.php making any adjustments for your site. (database credentials, etc), prior to running the WordPress installation script as you normally would.

htaccess is pre-configured

While the .htaccess file is pre-configiured, you will still need to make some minor adjustments such as:

  • Change example.com and example\.com to your domain.
  • Update 123\.123\.123\.123 to the IP address you wish to allow access to the wp-admin/ folder

After installation

Edit the lockitdown.sh script, and change the last line so the path is the same as your uploads path (if you changed it from assets/media).

You will then want to run the lockitdown.sh script from your wordpress root (included), and delete it after. This will set the access modifiers on all files to 404 (read, none, read), and on all folders to 515 (read+exec, exec, read+exec). It will also ensure the directory assigned for uploading is writable. After this, it will delete the WordPress install script, license.txt, and readme.html files. You should delete the lockitdown.sh script after running it.

Notes

There is now a .htaccess file inside assets/media which disables all exec file handlers (scripts will not run from this folder), so even if an attacker uploads a file here, it will not execute.

There is a plugin we wrote called "lock-it-down" and is the ONLY plugin in this installation. Enabling this plugin will do the following:

  • Prevent WordPress from overwriting your .htaccess file
  • Disable the author archives page.
  • Disable user registration.
  • Turns off the multiple sizes for image uploads. Only the original will be used.
  • Disable theme and plugin automatic updates.

After completing your installation, you should ensure that the credentials used for the database settings, are limited to only what you need.

wordpress-lockdown's People

Stargazers

kristof kaehler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.