Archive for the ‘wordpress’ tag
Teething troubles
After upgrading to WP 2.1, I got three illegal offset type errors and an undefined constant error. The second type was easily fixed - missing single quotes. For the first type, I first thought of typecasting the array keys in the necessary lines; but then, just for the heck of it, decided to do the upgrade the orthodox way.
The way I usually carry out an upgrade is to do it on localhost and then upload the files and the WP SQL export. After running into problems this time, I followed the official way of uploading the new files and then running the upgrade process on the hosting server. Till now, it is working - no errors. I’d better close the ticket I opened on WP support for this fault.
The final problem I get is “The connection to the server was reset while the page was loading”. I will have to figure it out with the host.
Overall, it was an interesting week getting my site transferred.
Wordpress 2.1 is out!
And I got to know just when I was uploading WP 2.0.7 to my new host too!
So here it is - after close on to eight months of the disappearing act, this blog is up - on a new host with the latest and greatest version of WordPress ever. The theme’’s new too (yeah, yeah - tell me how I”m artistically impaired - but I like this theme). Well, the favicon and header image are my own stuff, so maybe you are entitled to your opinions.
Some finishing stuff is left - so pardon any quirks for a week or so. Do comment - I would like to see this working at 100 percent!
the final touch
The one thing that was keeping me from recommending WP all-out to others was its import compatibility. Till now, I could import Blogger posts and make sure their comments were linked and counted. But I was not able to set their categories. I got this idea a few hours ago. Its my first PHP-MySQL code.
The MySQL query on lines 8-11 updates the post2cat table which holds the post-category linkages. The import script I am using somehow skips this detail. Once the posts have a legal category ID, it is a trivial matter to move them in the WP system.
// after initial install, this should be 3, check your wp_post2cat table, take last value + 1 $new_rel_id = 18; // check the ID of the last imported post ID from admin interface $last_post = 83; // value of counter is the first imported post ID for ( $counter = 3; $counter < = $last_post; $counter += 1) { mysql_query(" INSERT INTO wp_post2cat (rel_id, post_id, category_id) VALUES ('$new_rel_id', '$counter', '1' ) ") or die(mysql_error()); $new_rel_id += 1; }
I will put up the full details of my WP install and an enhanced version of this code (two more queries to merge post authors and comment authors) on a static page later.
No responses yet