WordPress change login image

This is more fun than real use, I want Gandalf from Lord of the Rings to protect my word press login.Its really simple, just upload the images to your web space and then open the “/wp-login.php” and change the this:

<div id="login"> 
<h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>

to this:

<div id="login"> 
		<img id="login_img" src="/img/ysnp.jpg" width="100%" height="100%"> 


and now I want another error image, for this find this part:

echo '<div id="login_error">' . apply_filters( 'login_errors', $errors ) . "</div>\n";

then add my line:

echo '<script>document.getElementById("login_img").src="/img/bwl.jpg";</script>';


for a bigger view I changed the “/wp-admin/css/login.min.css”:

#login {
    margin: auto;
    padding: 8% 0 0;
    width: 640px;


and now its looks pretty like this:

gandalf1And the error screen:


I hope you like it!

For a live preview look at http://scheinast.eu/wp-login.php.

Search engine optimization (SEO)

This article is how to improve the search engine rank like Google, Baidu, DuckDuckGo, Yahoo or Yandex.


Robots.txt and Sitemap

The “Robots.txt” lets the Search engines know what directory’s are allowed to crawl and what not.

The Sitemap is a map where all pages are listed so the Search engine could index all your pages.

My “Robots.txt” :

User-agent: *
Disallow: /wp-admin/

Sitemap: http://scheinast.eu/sitemap.xml

I allow to crawl everything excepted my admin folder, and I show them my site map so they know what’s all on my Blog.You could use a plug-in for your Blog or generate them by yourself, for self-made look at Sitemap Generator and for Plug-in here.

For a live preview you could see my Robts.txt here and my Site map here.

Now its better to say the search engines that you homage is new, but you could wait until they find you too.To add your web page to Google webmaster-tools click here and for Bing here.In both tools you have nice features to see how many pages are ready for the search or how many users are on your page.

Meta tags

Then you should fill up your meta tags like description and keyword so the Search engine knows what’s the theme about you homepage, I use this plug-in: Add Meta Tags.

back links

Back links are links from other pages to your page, so the search engine thinks your page have a lot of important information.For building back links you find enough tools via google.


Its very important to bring good content so back links would build from alone.

Share buttons and social pages

Make your own social page and use an auto poster like this and like buttons like this to make your platform available in social networks.This brings good back links and a more users on your page.

push social

To push your social network you could try like4like and always bring new good content.

As an example my social network links: facebook profile, facebook page, blogger, twitter, blogspot, delicius, tumbler, wordpress and google plus.


I use captchas to avoid spam on my blog but it is a problem for search engines if they don’t access to your web page so don’t overuse them.Another problem is flash,search engines are not able to read that so avoid it.

JavaScript in word press post

Sometimes I want to post some examples about JavaScript and html, but word press removes the JavaScript so it don't work, for that I installed the JavaScript-Inline-Plugin now you could wrote your code like that:

But don't forget so do this in the Text tab, and if you move back to Visual its gone... that's annoying but the best what I found ....

WordPress Backup Script

I made a simple script to backup my word press every day at 12:30, if you want to make it by hand look at Backup WordPress. script
mysqldump --databases --opt -Q -uroot -pPASSWORD wordpress | gzip > database.gz
#create archive
tar -cvpzf   "/Backup/"`date +%d-%m-%Y`".tar.gz" ./database.gz /var/www/
#copy to backupserver
sshpass -pPASSWORD scp  "/Backup/"`date +%d-%m-%Y`".tar.gz" root@server.local:/volume1/DATA/BACKUP
rm "/Backup/"`date +%d-%m-%Y`".tar.gz"
  Install save this script at your server, I choose "/root", then run this:
mkdir /Backup;
chmod +x /root/backup.sh;
apt-get install sshpass;
now we add this to the cronjob:
crontab -e
and add this line:
 10  8 * * * /root/backup.sh
then wait and test if your server shows the backup files.

wordpress backup problems with rewrite

I set up my new word press to my new Silent Server, after I moved the database and the ftp folder I had some troubles with the permalinks, this shows how to solve them. Set Rights navigate to your www folder, my one is at "/var/www", then set the rigthts, user and the group:
chmod -R 755 ./
chown -R www-data:www-data ./
Set rewrite now I check if rewrite is enabled:
a2enmod rewrite
now open apache2.conf with:
nano /etc/apache2/apache2.conf
and add this line:
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
now open sites-available/default with:
nano /etc/apache2/sites-available/default
and change this:
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
to this:
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
  After you made your changes restart your web server:
service apache2 restart

Backup WordPress

Its importand to make Backups, and so we make a backup from our wordpress. At first we copy all files from our server to the local host: copyI used the integrated FTP manage but you could use another FTP program too.   Now we make a dump from our database, login into your phpmyadmin, and then: phpmyadmin
  1. Export
  2. manual to choose what database (only wordpress)
  3. if you want to backup all (more than wordpress)
  4. only wordpress
  5. compress to save store
phpmyadmin_ok Now hit the OK Button and download the File. If you have to use your backup look at : wordpress backup problems with rewrite. For a backup script look at WordPress Backup Script.