Adding product images to Woocommerce

Working on WordPress woothemes for woocommerce and wanted to add multiple images to a product without adding to the description post. I couldn’t find anything inside WordPress to do that so I went straight to the MySQL database to see what was linking it. In “wp-posts” table under “post_parent” field where the image record is if you change the post_parent number to a product id post number it will show up as one of the product images.

 

 

tags:
wordpress change image parent, pictures, woothemes

Python and MySQL

I needed a better way to prevent spammers from coming to my site.  I was manually retrieving their IP address and blocking on my .htaccess file.  However, I decided to automate it by using a python script, crontab, wordpress and MySQL.  My biggest issue was to get python to connect to mysql.

I build a script that fetches every IP address marked as spam in wordpress. Crontab runs this script every week which creates and replaces the .htaccess file with updated data.

stop_spam.py

Send Email from WordPress

This plugin will allow you to setup the SMTP server which will allow you to use WordPress plugins that use email. You will be able to choose from your own or gmail SMTP.

If you wish not to use a plugin but instead use a PHP script using phpmailer.

If you want to send out email notifications to a commenter when they are replied. Download the comment-reply-notification plugin
More information on this plugin.

tags:
wordpress email notification reply comment
wordpress send email reply comment

Piwik Installation

Piwik is an open source website traffic analysis. I decided to give it a try over google analytics, one of the reasons is because the data can be stored on my server if I choose to and its fast.

Installation was simple, One may be confused by the different versions piwik has such as a plugin for wordpress and the actual source. The plugin for wordpress is only an integration that cannot be used by itself but with the actual source installation. Piwik can be installed on any server and it doesn’t need to be inside wordpress directory. Below is a non-english video which shows how to install it. What he says is not important.

>Server showing IP address in URL?

>To link the domain name to your server the A (address) at the DNS site (eg. namecheap.com) needs to point to your public server IP address. Recently I was having an issue with my site because when I typed baligena.com it went to the site however when I click on a link it would be replace by my IP address in the URL. It’s funny when you call for tech support its a waste of time because this shit is too advanced and they won’t be able to help you. What I figured out it wasn’t the domain name nor the server that was causing this error but WordPress. WordPress has an option to specify your site URL.