Suramya's Blog : Welcome to my crazy life…

August 26, 2020

Relaunching Suramya’s Book Review Cafe

Filed under: Books Related,Website Updates — Suramya @ 11:15 AM

In 2010 I created a section of my website dedicated to book reviews but over the next few years that section was removed from the site. I honestly don’t remember why that happened but my best guess is that I was updating the website theme, never got around to migrating the section and then just forgot. I reviewed 71 Books during the time the site was active and looking at my logs if I had continued to review every book then I would have reviewed over 1500 books to date. πŸ™‚

I finally revived the site over the past few days and instead of using the custom website that I had created with a bare-bones CMS system, I have switched over to WordPress as its a lot easier to manage/maintain WP sites. Migrating the old reviews was a painfully manual process where I had to export the data from the DB and then format it correctly for WordPress. Most of it I was able to automate but the Affilate links had to be manually updated and it was painful to say the least. But finally I am done and all the old reviews are imported into the updated site. Going forward I will be adding the book reviews to the site regularly.

You can access the site at: Relaunching Suramya’s Book Review Cafe.

There are some changes to the rating system that I have implemented for the reviews going forward to make the ratings easier to understand and more consistent. In the past I used a scale of 1-10 for the ratings but I will be using a scale of 1-5 (5 being the best) going forward.

Let me know if you have any questions/comments about the site or would like to give feedback on features that I should incorporate.

– Suramya

PS: This notice is duplicated on the Review site as well.

August 18, 2020

Finally moved the Website & Blog to https

Filed under: Computer Tips,Techie Stuff,Website Updates — Suramya @ 12:02 PM

After spending way too much time avoiding the work due I finally configured both suramya.com & the Blog to be https by default. The setup was fairly simple, I added the certificate on the 1and1.com portal, then after a few mins I was able to access the site over https. In order to redirect http to https automatically I followed the following steps:

Auto Redirect to https in Apache

Configure .htaccess to force a redirect, you can also configure it in the Apache main configuration (under the virtualhosts directive) but since I don’t have root access and can’t modify it I updated the .htaccess config to do the same thing. Basically you need to add the following lines to .htaccess :

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.suramya.com/$1 [R,L]

Change www.suramya.com to your domain, else every visitor to your site will be sent to my site. Not that I will mind that, but you might. πŸ™‚

Then I did the same thing for the blog with a small change, The .htaccess for the blog reads as the following:


RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.suramya.com/blog/$1 [R,L]

When updating the file, you need to ensure you put the changes outside the # BEGIN WordPress & # END WordPress as the content is dynamically generated and would be overwritten.

Updating all the urls in WordPress

After I made the changes above, I found that the site was being redirected to https but I was getting errors about mixed content on the page because all the URL’s/Images that I had uploaded to WP till now were saved as http and not https. So I had to change every URL in the blog from http to https and to be honest I wasn’t looking forward to doing this manually. I searched the web and found this site that had instructions on how to update the url’s using the WordPress commandline interface. From the blog directory you need to issue the following command:

wp search-replace http://www.suramya.com/blog/ https://www.suramya.com/blog/ --dry-run

This command does a dry run and tells you what all changes will be made and if everything looks ok, then you can run the above command again without the ‘dry-run’ call.

wp search-replace http://www.suramya.com/blog/ https://www.suramya.com/blog/

If all goes well you will get an output similar to the following:

(uiserver):~/public_html/suramya.com/blog$ wp search-replace http://www.suramya.com/blog/ https://www.suramya.com/blog/ 
+------------------+-----------------------+--------------+------+
| Table            | Column                | Replacements | Type |
+------------------+-----------------------+--------------+------+
| wp_commentmeta   | meta_key              | 0            | SQL  |
| wp_commentmeta   | meta_value            | 572          | PHP  |
| wp_comments      | comment_author        | 0            | SQL  |
| wp_comments      | comment_author_email  | 0            | SQL  |
| wp_comments      | comment_author_url    | 29           | SQL  |
| wp_comments      | comment_author_IP     | 0            | SQL  |
| wp_comments      | comment_content       | 2            | SQL  |
| wp_comments      | comment_approved      | 0            | SQL  |
| wp_comments      | comment_agent         | 0            | SQL  |
| wp_comments      | comment_type          | 0            | SQL  |
| wp_links         | link_url              | 0            | SQL  |
| wp_links         | link_name             | 0            | SQL  |
| wp_links         | link_image            | 0            | SQL  |
| wp_links         | link_target           | 0            | SQL  |
| wp_links         | link_description      | 0            | SQL  |
| wp_links         | link_visible          | 0            | SQL  |
| wp_links         | link_rel              | 0            | SQL  |
| wp_links         | link_notes            | 0            | SQL  |
| wp_links         | link_rss              | 0            | SQL  |
| wp_options       | option_name           | 0            | SQL  |
| wp_options       | option_value          | 3            | PHP  |
| wp_options       | autoload              | 0            | SQL  |
| wp_postmeta      | meta_key              | 0            | SQL  |
| wp_postmeta      | meta_value            | 0            | PHP  |
| wp_posts         | post_content          | 591          | SQL  |
| wp_posts         | post_title            | 0            | SQL  |
| wp_posts         | post_excerpt          | 0            | SQL  |
| wp_posts         | post_status           | 0            | SQL  |
| wp_posts         | comment_status        | 0            | SQL  |
| wp_posts         | ping_status           | 0            | SQL  |
| wp_posts         | post_password         | 0            | SQL  |
| wp_posts         | post_name             | 0            | SQL  |
| wp_posts         | to_ping               | 0            | SQL  |
| wp_posts         | pinged                | 20           | SQL  |
| wp_posts         | post_content_filtered | 0            | SQL  |
| wp_posts         | guid                  | 2775         | SQL  |
| wp_posts         | post_type             | 0            | SQL  |
| wp_posts         | post_mime_type        | 0            | SQL  |
| wp_term_taxonomy | taxonomy              | 0            | SQL  |
| wp_term_taxonomy | description           | 0            | SQL  |
| wp_termmeta      | meta_key              | 0            | SQL  |
| wp_termmeta      | meta_value            | 0            | SQL  |
| wp_terms         | name                  | 0            | SQL  |
| wp_terms         | slug                  | 0            | SQL  |
| wp_usermeta      | meta_key              | 0            | SQL  |
| wp_usermeta      | meta_value            | 0            | PHP  |
| wp_users         | user_login            | 0            | SQL  |
| wp_users         | user_nicename         | 0            | SQL  |
| wp_users         | user_email            | 0            | SQL  |
| wp_users         | user_url              | 0            | SQL  |
| wp_users         | user_activation_key   | 0            | SQL  |
| wp_users         | display_name          | 0            | SQL  |
+------------------+-----------------------+--------------+------+
Success: Made 3992 replacements.

That’s it. After running the command, the blog is completely on https and the security gods are happy :). Now I need to update all the URL’s on the main site to reference https instead of http and that is going to be painful. It will require a whole lot of script-fu to do it automatically as it will have to be a regex/awk or something similar. Maybe someone already did the work and posted the solution online. Alas that was not the case. I ended up manually updating the files since there were only about 20-25 of them. Opened all of them in the editor one-shot and then did a search & replace. Now both sites are coming up properly in https.

– Suramya

August 17, 2020

Issue with Site Posts

Filed under: Website Updates — Suramya @ 2:50 PM

Update 8/17/2020: Issue resolved. The problem was caused because I had a missing single quote in the previous post. Once I added the quote to the post things went back to normal.

There seems to be an issue with WordPress where some of my posts have gone MIA on the main page even though the direct links work. Also some of the posts are being merged together for some reason.
I am looking into it, so please be patient.

– Suramya

October 2, 2014

Celebrating 10 years of Blogging

Filed under: My Thoughts,Website Updates — Suramya @ 1:51 AM

As of 1st Oct 2014, Suramya’s Blog has been online for exactly 10 years and I have spent a lot of time posting random thoughts, tutorials, event analysis etc on the Blog. In my first post I said “I donÒ€ℒt know how often I will be updating this but I will definitely try to update this a little more often than my website.”, if nothing else I know for sure that I did manage to update the blog more often than the main site (which is something I do plan to change BTW by updating the site more often). There were periods where I didn’t post much and the blog just languished and periods where I posted tons of posts.

Here are some stats as of 2nd Oct 2014:

Total published posts : 876
Total Published Comments [1] : 560
Spam Comments Blocked : 438,580
Maximum posts in a Month (Made in Jan 2010) : 81
Media Uploaded : 26MB

I wish I had visitor stats to share but I don’t because the plugin I was using earlier maxed out my DB size allocation and I deleted the data to bring the site back online. I just enabled a new plugin today that is highly recommended and doesn’t use that much space (as per the reviews). Let’s see how that works out.

It is interesting to note that most of the folks who had active blogs when I started no longer blog actively, for some post once every few months others haven’t posted in years. Some of you may wonder why that is the case. Well the answer is that I don’t know. Some folks got busy, some ran out of things to say or just lost interest. I blog because I like to have a way to talk about stuff I have been thinking about, stuff I find interesting or just random things I find online. I think as long as I keep finding cool things I will keep posting about it (Provided I get the time to write posts that don’t sound like they were written by a 5 year old.) Here’s to another 10 years of ‘successful’ blogging.

Well this is all for now, will post more later.

– Suramya

[1] A lot of the comments were lost when I moved from my old blogging software to WordPress. I had intended to spend time writing a parser to import them to WP but never got around to doing it.

March 31, 2014

Blog/site is having issues

Filed under: Website Updates — Suramya @ 12:24 AM

The entire suramya.com domain is having issues, but the blog is the most hit. Spoke to 1and1 (my hosting provider) and as per them there is a issue ongoing that could be impacting my sites as well. They expect it to be resolved in the next day or so… As currently the blog admin pages are pretty much unusable so I don’t think I will be posting anything till it is resolved.

Update (2nd April 2014): The site is now back to normal, but still no answer on what was causing it to become so slow. Ah well… Atleast now I can get to the admin page now and all I need is some time to create posts.

– Suramya

July 18, 2013

Did some maintainence on the site. More to come

Filed under: Website Updates — Suramya @ 10:08 PM

After a long time of trying to ignore the issues on the site, I finally spent some time last night doing some maintanence on it. Upgraded the version of WordPress that I am using to the latest version, also fixed the DB issue that caused the Photogallery to go down. No, I haven’t uploaded any new content or photos to the site yet. Will do that sometime this year. πŸ™‚

I also need to move the site to a new hosting service but need time to do all the nitty-gritty backend work to get the site to work on the new servers so that is on hold till I know I have a weekend to spend on it. Dusted off some old articles that I was in process of writing till I got distracted so might finish some of them this weekend, but lets see.

Well this is all for now. Will post more later.

– Suramya

June 22, 2012

Bug in FB Publication script fixed + Other Blog woes

Filed under: Knowledgebase,Website Updates — Suramya @ 11:56 PM

Fixed a small bug in the Facebook publication script that I had written, basically if the first para was over 1000 characters the post would fail. At first I thought I would just do a substr and limit the character to 900, but that didn’t work for some reason and I got some really weird posts on FB. But it looks like its working fine now and the last post came up on on Facebook. πŸ™‚

There was another issue which I had faced a couple of days ago on the blog and wanted to document. Basically whenever I tried posting any comment or new post on the blog I would get a really weird error message that made absolutely no sense:

Are you sure you want to do this? Please try again.

After spending a couple of hours on the web over a period of few days trying to get things working, I found a post explaining how to turn DEBUGGING ON in WordPress (See below for instructions) and once I enabled that I found out that the DB I was using was over the max size my hosting company allowed so all inserts were failing, removed junk from the DB (Stats etc) and I was good to go.

To enable debugging follow these steps:

  • Open wp-config.php located in the wordpress blog’s root directory
  • Add the following line to the file:
    define('WP_DEBUG', true);
  • Save the file and Exit

Once you finish debugging you should either comment out the above line or delete it from the file, otherwise a lot of debug information will be shown to your visitors and that is something you don’t really want.

Hope this helps others.

– Suramya

October 5, 2011

Facebook does not like my Blog

Filed under: Website Updates — Suramya @ 12:21 AM

Looks like the integration between Facebook (FB) and my blog is broken once again. There is a plugin for WordPress that pushes your posts to Facebook but that requires you to setup an App in Facebook. However since I am not a Developer on FB so far I need to authenticate myself by giving FB either my Credit card # (So not happening) or my cell number (not working).

I have tried both my numbers but so far haven’t received any SMS’s from FB yet. Will try some other plugins while I am waiting but am not too hopeful that I will succeed in the integrating the two today. Lets see…

Update: Looks like all of the plugins require a Facebook app to be created in order to connect. πŸ™ Although the problem with me not receiving the SMS could be because Facebook is having issues. At present all profile images on Facebook are showing up as broken for me.

– Suramya

September 17, 2011

All of suramya.com now migrated to new layout

Filed under: Website Updates — Suramya @ 5:24 AM

As promised, I have updated the entire Suramya.com site except the Photogallery to use the new website layout/theme. This will make life simpler for me when I update (and yes I will be added new content semi-regularly once again) and make the site look a lot better.

For the Photogallery I might use the Gallery software to host the photos, but haven’t decided yet. Since that will take some work on my side to integrate and migrate data, it will be a while before the new Photogallery is live. Till that happens don’t expect any new posts to the Photogallery.

I will also be adding some more website optimizations etc once I get some sleep and am thinking clearly again. That should speed up the site a lot more. Take a look around and let me know if you find any issues.

– Suramya

September 15, 2011

Exporting Blog feed to Facebook

Filed under: Website Updates — Suramya @ 3:09 AM

I thought I had done this earlier but I guess Facebook changed its protocols so the import stopped working at some point in time. *shrug* No big deal, I have once again configured up my Facebook account to read and post any blog posts I make to my Facebook Wall.

If all goes well and nothing breaks, people on Facebook will be able to see this post on Facebook instead of having to visit the blog. Although I would rather that people visit the blog directly instead of viewing on FB because I don’t know if the comments (if any) made on Facebook for a post will be synced to the Blog or not. I guess I should try and figure out a two way sync between the two. Or maybe not. Lets see.

Let me know if you hit any errors or issues.

– Suramya

Older Posts »

Powered by WordPress