Table of Contents
- Change Base-URL without web front end access
- Secure login by htaccess protection
- Remove googleapi references
- Enable upload for files without restriction
- Export and Import
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.
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.
htpasswd -c /path/to/the/wordpress/directory/.htpasswd jukey
Thefollowing command changes the password for the user jukey:
htpasswd /path/to/the/wordpress/directory/.htpasswd jukey
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
The default wordpress themes are using google fonts. In order to remove these references for privacy reasons just install the plugin:
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. */
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