So, in case you didn’t notice, I updated my website’s look and feel. While I was at it, I upgraded to the latest version of WordPress (v3.4.1) from my pretty ancient version 2.? version I installed years ago. My, how things have improved. It all went pretty smoothly, but there were some good ‘gotchas’ that I wanted to make note of.
- Start from a template – The best way would simply to take one of the supplied ones and start modifying – as they are considered the canonical reference designs. I started from one from a great web design guy who has won numerous awards. He provides his ‘blank’ theme as a zip, along with his handy and time-saving tips to get the job done faster.
- Don’t touch the php files until you’re at finishing touches! Everything you probably do should be in the style.css file – Your temptation again and again will be to modify the HTML code in the header.php/footer.php/index.php/etc files. DON’T do it. Use the style.css code to do what you need. Most of the templates have everything you need in them already – you just need to modify their appearance via their style.css information. Reasons? Most of the code in the canonical templates has been tested extensively on many different browsers and have stood the test of many trials. Yours has not. Anything in those files is forever static – no matter how your page is used. Single.php is used in several places – and in different formats. Futzing with anything other than the styles will likely break things.
- Do all your development locally. Set up a local XAMPP server and develop your theme locally. Get everything working right – then publish. Saves you TONS of time and gives you experience installing wordpress.
- Syntax error, unexpected T_VARIABLEon 1and1 hosting– When I installed my new, pristine version of WordPress on my 1and1 hosting, I got this error. I had done this before without issue, but then I found this forum discussion on the topic. Turns out 1and1 hosting hadn’t updated their PHP version. Add a
.htaccessfile to your root directory with only this inside :
SetEnv PHP_VER 5
- This does not appear to be a WXR file, missing/invalid WXR version number when exporting/importing from old WordPress version. I upgraded from an old 2.x version of wordpress to 3.4.1. I exported just find and got a nice, big .XML file with all my posts in it. When I went to import it though, I got that error. Turns out the old versions didn’t put the version number in the file when exporting it. I simply opened up the .XML file, and added the following line near the top.
Everything imported like a champ.
There were lots more notes, but I’ll save those for another time, as these were the big ones that took some digging around.