September 29, 2013

mod_rewrite check with php

.htaccess file

echo ‘mod_rewrite ‘.((strpos(shell_exec(‘/usr/local/apache/bin/apachectl -l’), ‘mod_rewrite’) !== false)?”:’ does not ‘).’ exist’;

September 27, 2013

How to merge two databases in WordPress?

merge ahead

How to merge two databases in WordPress? You must be surprised that what does it mean by merging two databases in WordPress and why it is required? In fact, i faced a challenge few days ago where new database was updated with respect to the settings, themes and other installation stuff but the old database […]

September 25, 2013

Precautions before moving a website to a new server


Precautions before moving a website to a new server Updating latest releases is not an issue, it can be performed by anyone but the most important thing is to check the vulnerabilities before updating it. You should have a mirror site on some staging server to test the recent releases. Analyze it, make sure that […]

September 23, 2013

A complex mysql “over” query


A complex mysql “over” query SELECT Candidates.CID, Candidates.NAME, Candidate_Scores.SCORE FROM Candidates, (SELECT CID, SCORE FROM ( SELECT CID, SCORE, Rank() over (Partition BY CID ORDER BY SCORE DESC ) AS Rank FROM Candidate_Scores ) rs WHERE Rank

September 21, 2013

Multiple images are not importing to gallery!

Woocommerce CSV importer Note: If you are using FAT32 system then you might will face the same issue. if(!function_exists(‘wce_gallery_update’)){ function wce_gallery_update($post_id, $attach_ids){ is_array($attach_ids)?$attach_ids:array(); if(!empty($attach_ids)){ $meta_value = implode(‘,’, $attach_ids); update_post_meta($post_id, ‘_product_image_gallery’, $meta_value); } } } Woocommerce CSV importer

September 19, 2013

WooCommerce Version 2.0.12 – get_item_meta

WooCommerce Version 2.0.12 File: classes/class-wc-order.php Function: get_item_meta Issue: It returns empty although itemdata table have records. Ref: Support Suggested Fix: There is another function which is available in the same class with the name “has_meta”. We can use it as an else case. Insert the following code in function “get_items” after this line $items[ $item->order_item_id […]

September 17, 2013

WordPress Menus


I want to ask about the WordPress menus, can you please guide me? If you are a normal user then click here. And if you are a developer or customizing some theme templates then follow this link.