GithubHelp home page GithubHelp logo

wordpress-post-installation's Introduction

Collection of changes necessary after a fresh Wordpress installation

Table of Contents

Change Base-URL without web front end access

In case the Base URL of the website needs to be changed and there is no way to log in in order to do so it is possible to add the following to the wp-config.php:

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

Using this solution you cannot any longer edit the base URL in the General Settings page in the admin panel.

Secure login by htaccess protection

A lot of attacs against wordpress installations are using the login page and login using a stolen or guessed password or using a security vulnerability. It become a good practice to protect the admin pages of wordpress installations by a second barrier called htaccess. This description was influenced by this blog post.

1. Create a password file

htpasswd -c /path/to/the/wordpress/directory/.htpasswd jukey

(optional) Change password

Thefollowing command changes the password for the user jukey:

htpasswd /path/to/the/wordpress/directory/.htpasswd jukey

2. Edit .htaccess

The htaccess file already contains the default entries that look like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Add the following below:

# BEGIN jukey
<Files wp-login.php>
 AuthName "Admin-Bereich"
 AuthType Basic
 AuthUserFile /path/to/the/.htpasswd
 require valid-user
</Files>

<FilesMatch "(\.htaccess|\.htpasswd|wp-config\.php|liesmich\.html|readme\.html)">
 order deny,allow
 deny from all
</FilesMatch>
# END jukey

Remove googleapi references

The default wordpress themes are using google fonts. In order to remove these references for privacy reasons just install the plugin:

Enable upload for files without restriction

Add the following at the end of the editable part of the config file:

/* Edit by Uwe */
define("ALLOW_UNFILTERED_UPLOADS", true);

/* Das war’s, Schluss mit dem Bearbeiten! Viel Spaß beim Bloggen. */
/* That's all, stop editing! Happy blogging. */

Export and Import

This is relevant only if you are going to migrate existing pages and postes to the newly installed Wordpress blog. Could be found in the tools section

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.