Stupid Mistake

Every once in a while, we make mistakes.  It can happen to anyone of us. Hearts may break because of one’s stupid mistake.

This is the story of one of my stupidest mistakes. EVER.

I was bored one Saturday  so I thought of doing some weekend fun. My idea was to code my personal web project which uses WP as its backend.

<sarcasm> Yay! So fun! </sarcasm>

So I was doing my thing, coding, making things and then FTP-ing the shit into the server.

Suddenly, I encountered:

PHP Fatal error: Call to undefined function get_header()

Looks scary right? How can that function be gone when I’m just living my life inside a WP theme. I did not touch the core files.

After some investigation, I found the culprit. (Oh yeah FBI-ish)

Man, I thought I did some programming error but boy oh boy, it turned out to be just something STUPID.

I UPLOADED MY THEME’S index.php TO THE ROOT OF THE SITE.

So yeah. It was a stupid mistake. Now I’m assuming you have a local copy of your root’s index.php so just delete the (wrong) index.php that you uploaded and upload the right thing.

So what happened? Well, basically  the index.php of WP which loads the wp-blog-header.php (which loads the templates and all the necessary shit) was overwritten.

Things I learned:

  1. When FTP-ing, make sure you’re on the right PATH. (check your destination)
  2. Don’t watch The Voice of the Philippines while coding.

With that, I will leave you a very fitting video!

I can’t take my heart will break
‘Cause I made a stupid mistake

HAHAHAHAHAHA!

Happy coding!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s