Con Schneider


All articles by Con Schneider

Saving posts programmatically after an import

I recently did a bulk post import for one of my sites and noticed that the related articles did not get set. Upon inspecting I found that saving the post manually in the backend did also set the related posts as desired. So I wrote some code to get posts by custom taxonomy and then auto save them all:

I suggest using WP Console to run this code – this external post explains how it works. Hope this helps you save some time the next time you need to autosave posts.

Regenerating Docker Machine TLS Certificate

Yesterday I updated my virtual box which confused my Local by Flywheel setup much. It got stuck in a loop, “Regenerating Docker Machine TLS Certificate ” then “Checking System”.

Here is the solution that worked for me as posted in: work on a Mac. If your Local runs on Windows, visit the link above for a modified version.

Quit Docker. Open terminal and run:

alias local-docker-machine=”/Applications/Local\ by\”

Wait for it to run, should only take a moment.