Tag Archives: blog

My wordpress blog got hacked!

Suddenly two of my blogs could not be viewed. It was blank and another one display the “Warning: Visiting this site may harm your computer!” when browse with Google Chrome.

What I did to recover..

1. Remove the injected script in infected files (this can be checked in the error log file)

2. Login to my wordpress and export all content and save it on my PC

3. Download all my images in wp-content/uploads folder

4. Totally remove the wordpress

5. Do fresh installation with latest wordpress version available in Fantastico

6. Upgrade wordpress to latest version available with auto update feature

7. Make sure I don’t use “admin” as username for my blog and password at least 8 character long consists of aplhabet, number and special characters.

8. Install only neccessary and trusted plugins and themes. Immediately update plugins if new version available

9. Import all the files with import feature in tools

10. Copy back all the images to wp-content/uploads folder. Better check first to ensure no unwanted files in the folder.

Other than that..

1. Scan PC for virus and malware

Inserting source code in a blog post

I’ve been looking for WP plugin to add source code in blog posting. I want to share my code sample via the blog. At last I found this WP-Syntax plugin.

Here how a source code will look like

1
2
3
<?php
  echo "Hello World!";
?>

You need to add <pre lang=”php” line=”1″> tag before and </pre> tag after the source code. The parameter line=1 is to show the line number