WordPress Blackbelt

By , December 18, 2011 9:27 pm

I’m bestowing upon myself the rank of WordPress Blackbelt.  A couple years ago, I wrote a post about how to copy your WordPress installation from your internet server to your localhost server.  I was new to WordPress and had trouble with the simplest things.  A lot of people have posts and help on the internet, but when you’re new web development and you’re stuck on something – and I mean really stuck, and there’s no one to turn to, you have two choices: you can give up or you can persevere.  I keep choosing to persevere and I’m glad.  It has made me so much stronger and has given me so much confidence.

Two years later, I still have a lot to learn.   But, I have the basics down and I can survive in this jungle they call the internet.  I fear no hacker.  Two years ago, when someone said HTML, I said gesundheit.  Today I can tell you how to launch a WordPress site with secure table prefixing, protect your wp-config file with htaccess, firewall your site from malicious hackers, sniff out base64 injection hacks and find the IP address of the motherfucker who tried to jack you and block his ass.  I can tell you how to block proxy access from malbots that come to steal my shit and put them on the blacklist until they come back on their knees with an apology.  I feel like finally I can survive in this jungle of web development.

Even if you can get through my black belt defenses, I can re-spawn in under a half hour like a I didn’t miss a beat.  I can’t tell you what confidence that gives me.  It makes me feel so good to be writing this post [that no one will ever probably read].  It makes me feel like I can put some teeth behind my testament to a future client that your code is safe with me.

I got into this web development thing with one site in mind: respectmyplanet.org.  For two years, I’ve struggled to learn the most basic foundations of knowledge in PHP, MySQL, HTML, CSS, Apache Server / htaccess, Javascript, and WordPress.  I’ve been hacked via my ftp connection because someone hacked Comcast and sniffed out my ftp username and password.  I’ve been PHP injected into my own weak PHP code because of my weak SQL $_POST sanitzation skills.  I’ve had my WordPress installation compromised because I didn’t know how to lock down my wp-config and wp-admin/installation.php pages.  Each time I was proverbially knocked to the ground with no hand reaching down to me to help me back up.  But, I got back up.  I got back up a little stronger than I was before.

Today, I can leave my sites wide open with no security and sleep like a baby because my backup procedures are solid as a fucking rock.  I can re-spawn from nothing like mushroom that grows out of nowhere in an instant.  But, I don’t leave my site wide-open, I lock it down and I lock it down tight.  For the first time in two years of having my teeth kicked in by the merciless hackers and malbots, I can stand confident in the blazing storm of internet anarchy and focus on the things I wanted to from the start:  PHP, MySQL, Javascript, Geolocation, Economics, Trigonometry, Chemistry, The Environment, et al.  I can focus on writing great articles at respectmyplanet.org, cornandsilver.com, wandelogic.com, and onebillparty.com.

As I write this, I am deleting my entire respectmyplanet.org site so I can relaunch it with secure table prefixing which is something I didn’t even know about when I started using WordPress.  I can’t tell you what a confidence boost it was to press the delete button on the website that got it all started.  Just knowing that I can bring that site up from the dead with twice as much security with the utmost confidence and ease inspired me to write this.  It really feels good.

All I hope is that I can pay it forward.  I hope that I can help someone else that might be as helpless and in need of help as I was two years ago.  I hope I can write and screencast some tutorials at wandelogic.com that help the next guy or gal that treads down this path.  There are a couple of poems that have meant a lot to me my entire life: If by Rudyard Kipling and The Bridge Builder by Will Allen Dromgoole.  If is a great poem that my dad has read to me since I was child and is probably my favorite.  The Bridge Builder didn’t reach my eyes and psyche until much later in life but its effect was no less profound.  Today I’m reminded of that poem and I post it here.  I hope one day what I have struggled to learn can help someone else.

Respectfully Submitted – The Daddyblog Webmaster

The Bridge Builder

By Will Allen Dromgoole

An old man going a lone highway,
Came, at the evening cold and gray,
To a chasm vast and deep and wide.
Through which was flowing a sullen tide
The old man crossed in the twilight dim,
The sullen stream had no fear for him;
But he turned when safe on the other side
And built a bridge to span the tide.
“Old man,” said a fellow pilgrim near,
“You are wasting your strength with building here;
Your journey will end with the ending day,
You never again will pass this way;
You’ve crossed the chasm, deep and wide,
Why build this bridge at evening tide?”
The builder lifted his old gray head;
“Good friend, in the path I have come,” he said,
“There followed after me to-day
A youth whose feet must pass this way.
This chasm that has been as naught to me
To that fair-haired youth may a pitfall be;
He, too, must cross in the twilight dim;
Good friend, I am building this bridge for him!

3 Responses to “WordPress Blackbelt”

  1. Bev says:

    DaddyBlogger – I am where you were two years ago with WordPress, currently just trying to copy an existing WordPress website to my localhost. I have the exact same questions you did back then:
    “Did I copy my db over to my pc when I copied the whole folder over?
    Where is my db or db file? I don’t know what I’m even looking for.
    How to I point WP to my db and have my localhost serve my blog on my pc?”

    How excited I was to find your post on the WordPress forum!!!
    Only I couldn’t make heads or tails from the link they provided. Maybe you can you help me?

    With appreciation,

  2. MW says:

    I still don’t know exactly where the db file is stored or if it is stored at all… It’s still a mystery to me. But, I do know how to produce a db file which is all that matters. From phpmyadmin, export the db and you will spit out a ‘.sql’ file that is your entire database. You can use this database as a restore point if you were ever to lose your blog.

    Some things to consider:
    1) The db has links to your media like pics and videos. For example: /example.com/wordpress/wp-content/uploads/2012/02/yourpicture.jpg. If you move to a different domain/URL or change the name of the wordpress directory that link would be invalid and need to be changed in your database. This can be accomplished by searching and replacing within SQL which is actually pretty easy for me now – but if you’re unfamiliar with SQL commands, it could be tricky.

    2) You can export your blog using the Tools feature from your WordPress Admin panel which makes it very easy if you have to move your blog. This technique is probaby easier if you’re unfamiliar or unsure how to use phpmyadmin or SQL in general. For example: you could export your entire blog to an XML file and save it anywhere, do a fresh install of wordpress on your localhost, and import that XML file and WordPress will magically setup your database and media files for you. There is a small caveat, your blog on the internet still needs to be available for WordPress to go out and find all the media for downloading to your localhost.

    3) There’s plugin written by Lester ‘gamerz’ Chan called wp-db-manager (sp?) that you can easily configure to backup your database at a specific frequency so you’ll never fall too far should you get hacked. It will create a ‘.sql’ file and email it to you and save it on your server. So if you get hacked, you can restore from your last clean database.

    Keep at it, it gets easier as time goes by 🙂 I didn’t know anything when I started using WordPress and I feel like I can do anything with it now.

  3. Bev says:

    Wow, it did work like magic. Thank you so much for taking the time to answer so thoroughly. Thank you also for the encouragement; I will persevere!

Leave a Reply


Panorama Theme by Themocracy

%d bloggers like this: