Πέμπτη 31 Ιανουαρίου 2013

WordPress :: A Dirty Hack

Aah, WordPress...
So well known, well coded, well designed, well... not really!

When it comes to solve a problem you have to be a hacker to find and open the secret back door. This is what happened. While I was trying to solve an issue the other day I came up with an idea to counter pass the problem in a... dirty way, he he he :-), to upload my site. The problem was a misconfigured path to the web server. I built the site in my local LAMPP installation in a subfolder and I had to set explicitly non-relative paths. So, when I uploaded the site on the web server it was like a devastated building. You get the picture right? 
No CSS, Javascript and images loaded plus the fact that my admin panel was inaccessible and redirected to my localhost. A disaster!

So, although the straight way is to install a new WordPress on the server side and transfer all needed templates, data, set paths and do all the mambo jumbo I had this dirty idea: 
What if I go to General --> Settings menu in my local installation and change the localhost paths to my website URL?

So, I did... and guess what? It worked! I was redirected to my website administration panel which now works perfectly and also all the non-relative paths in the front-end are now fine and the site is up and running.


«Don't learn to Hack... Hack to learn!»

Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου