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:
- When FTP-ing, make sure you’re on the right PATH. (check your destination)
- 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
First of all, this is a mini-rant.
Thank you, WordPress for your very informative and helpful guide on how to install your CMS: http://codex.wordpress.org/Installing_WordPress.
Just when I thought that everything’s going smooth…
What the fuck is Plesk? Just google it for unbiased description, BTW.
Basically, Plesk is a web-based control panel for shared and VPS hosting. In a nutshell, instead of FTP-ing and ssh-ing, a normal human being can just click and manage a hosted system.
I was asked by my boss to use it. Apparently, our client uses it so… there’s that. It’s supposed to make my life EASIER but it never did. My life has been a living hell so far.
I am talking about this certain WP site that I’m trying to deploy from my staging server that uses Amazon EC2. It’s supposed to be a 2-hour deployment but because of limited access and Plesk’s futility, it has become a nightmare experience for me.
Maybe it’s just the limited access that’s making me crazy but damn it. Plesk is a frustrating piece of shit. If your time is precious and you have a deadline to meet, don’t fucking use it.
Oh before I forget, Plesk has a 1-click install for WP but it’s an add-on thing. Uhm, go purchase? LOL
So I’ve been dealing with Facebook’s like button error for a while. FB offers an easy way of putting a Like button in your WordPress theme by using a configurator which will give you codes once you input some needed info. I got it from here https://developers.facebook.com/docs/reference/plugins/like/ and I thought I just messed up some codes because when I click the button, it gives me this error:
“Sorry, this post contains a suspicious URL: Unknown error”.
Upon doing some checks I got it all sorted out. Ugh.
By default ec2 gives a public DNS something like ec2-x-x-x-x.us-west-2.compute.amazonaws.com and Facebook treats it as a suspicious URL.Well, of course it does look suspicious. Look how long the URL is.
I tried other “valid” URLs and they worked.