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.
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.
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.
>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.