WordPress-Security

Secure WordPress with .htaccess file

Securing WordPress involves many many techniques, tricks. I don’t want to go too far on this topic, here let me share with you some useful code snippets that you can throw into .htaccess file without thinking. These code snippets will greatly enhance the security level of your WordPress blog/website, keeping 90% hackers outside of your site!

This tutorial applies to Apache, Lightspeed servers only.

Before we start , make sure you have this tiny, yet powerful file name .htaccess on your site root folder.

Note: if your WordPress installation is not on site root folder, don’t take .htaccess file with WordPress, this file must be kept on website root folder, it could, theoretically, be reached with this url :  http://www.domain.com/.htaccess   (due to security reasons, it could be reached using this way, but it’s there, right under the root folder ! )
Continue reading…

Windows

How to Extract Photos from Microsoft Windows Themes

What is a Windows Theme?

A theme is a combination of desktop background pictures, window colors, and sounds. You can preview each theme’s image collection by clicking Details. To get a theme, click Download, and then click Open. This saves the theme to your PC and puts it on your desktop. See Personalize your PC to learn more.

These themes offered by Windows are just so beautiful, so amazing. I’d like to collect some of the photos within the theme, but what I downloaded is Windows Theme Pack File (.themepack), like this:
Continue reading…

Load JavaScript Libraries from Google CDN

How to Load JavaScript Libraries from Google CDN & Why It’s Not Recommended

Tons of articles smartly tell us that we should add the following piece of code to theme’s functions.php file in order to harness the advantage of Google CDN:

//dequeue jQuery from any plugin
 add_action( 'wp_enqueue_scripts', 'dequeue_jquery', 999999 );
//enqueue jQuery from Google CDN
 function dequeue_jquery() {
 wp_deregister_script( 'jquery' );
 wp_register_script( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js');
 wp_enqueue_script( 'jquery' );
 }

This code snippet will dequeue jQuery library from WordPress, and enqueue Google hosted jQuery.

Continue reading…

Upgrade to Easy Smooth Scroll Links Version 2.0

Easy Smooth Scroll Links Version 2.0 is a temporary “fix” for bugs emerging since V 1.9

By default ,the plugin will use stable version of js code.

When you activate experimental feature, it uses aggressive version of js code, which brings more features while being buggy. Use at your own risk…

experimental feature

There is no timetable that I’ll fix those bugs, I’m in China, life is hard here, and recently large scale Internet censorship occurs, my Internet is very very slow now.

Still, if you want a Go to Top button, use this plugin https://wordpress.org/plugins/dynamic-to-top/screenshots/

Easy Smooth Scroll Links Version 1.9 Released

Before Version 1.9 , smooth scrolling effect only works on the same page. Now , you can smooth scroll from one page to another, which will make this plugin useful for setting up site-wide navigation.

Currently, there is a small glitch : When clicking the anchor link the page would flicker. If you mind it, downgrade to old versions https://wordpress.org/plugins/easy-smooth-scroll-links/developers/.

To achieve this great feature, I rewrote the javascript code and, sadly, remove the GoToTop button feature for it constantly conflicts with the smooth scroll feature. Please get a more professional GoToTop button plugin like this one:

https://wordpress.org/plugins/dynamic-to-top/

Enjoy the new plugin !

Happy blogging !