Mass update WooCommerce product status

After importing your products you might find they’re all set to ‘Private’ so you may want to set them to Published.

NB. Always backup your files and database first!

Simply log onto phpMyAdmin and select your Word Press database.

Click on SQL in the top menu and paste the following code in.

UPDATE wp_posts
SET post_status=’publish’
WHERE post_type=’product’

Click ‘Go’ to run the script.

It took about a second or two to complete on a database with over 1700 products for me.

Much quuicker than 20 at a time with the standard WP bulk edit tool!!

you can also set the post_type to ‘draft’ if you wish…

UPDATE wp_posts
SET post_status=’draft’
WHERE post_type=’product’

Ho do I use the latest version of php with Windows IIS?

Once you’ve installed php on IIS using the web platform installer, you might find that your websites do not automatically use the latest version. I had this problem while using Windows Server 2016.

If you go to handler mappings in IIS (either by selecting it for your whole server or one particular site) you can see the list of CGIphp versions although some of the later ones may not show the version (eg. phpv7) next to the name but may instead say something like PHP_via_FastCGI with a number at the end. If you double-click on one of these it will show you to the path to your php version, so you will know which is the right one to use.

Once you know which one you want to prioritise, click on ‘View Ordered List…’ to the right of the list and move this version to the top of the list. The system should automatically update instantly.

How do I save a file in notepad with a different extension?

If you’ve ever tried saving a file from notepad with a different file extension,you might find that sometimes it works,but sometimes it doesn’t.

Example: you save a file as index.php and it turns out it’s call index.php.txt

The problem is that notepad will often add a .txt extension to the file even if you have specified one in the filename.

Solution: when you type in the file name, put double-quotes on either side of the name and is will save it “as-is”

Example: “index.php”

Open source eCommerce Carts

There are plenty of Open source (freeware) shopping carts to use as your eCommerce website. Here are some of our favourites…

Opencart – “Everything you need to create, scale and run your business”

Magento – “The world’s biggest brands love Magento for its flexibility, because today’s consumers and their buying patterns are changing by the minute. “

WordPress integrated with WooCommerce plugin – “Create a free website or easily build a blog on” – “WooCommerce is a free eCommerce plugin that allows you to sell anything, beautifully.”

Now there is no excuse not to create your own beautiful little shop…