WordPress function current_time() uses same args as PHP’s date() and uses timezone from WordPress settings.
WordPress
Batch Import using WP-CLI
Place multiple export files into a single directory, then run the following: # Activate the wordpress importer wp plugin activate wordpress-importer –url=http://localhost/example.com/ # Iterate over all of the import files in a given folder. for f in myfolder/*.xml; do wp import $f –authors=skip –skip=attachment –url=localhost/example.com/; done
WP Error Reporting without editing wp-config.php
I don’t recall where I found this… Add this to your theme’s functions.php to turn on error reporting in WordPress. This way you don’t have to edit core files, and you have easy access to turn it on and off. Just remember to remove it or comment it out before you go live! // Show all errors, […]
Super Basic Bash Script for WP-CLI Import
Did my first WordPress import today using wp-cli. After unzipping the export file, I was looking at 157 xml files. Seemed plausible I could just point wp-cli import to the folder containing them, but all I got was an error: This does not appear to be a WXR file, missing/invalid WXR version number. Fortunately, I recently […]
How to Change WordPress Multisite Domain Name
http://halfelf.org/2014/changing-domain-name-multisite/ which referenced this, as well https://github.com/interconnectit/Search-Replace-DB