A Review of TasteWP

WordPressI was recently contacted by TasteWP asking for people to take a look at their system and provide feedback. Before I get into the feedback I gave them and a wider review, I think it might be best to first explain what TasteWP is and what it can be used for.

TasteWP provides a sandbox environment where you can easily test plugins or themes you are developing or which you want to try out before deploying to a production site. There are other existing methods which have been around longer, such as Local by Flywheel, so why TasteWP?

Well, I did use Local a few times when I first found it, but through time I stumbled over one limitation too many times and eventually stopped using it; that limitation was its use of VirtualBox for the virtual environment it created. As I extensively use Microsoft’s Hyper-V, I found myself having to continually switch off the hypervisor to use Local and then switch it on again when I was finished; while modern PCs with SSDs do restart very quickly, it is still disruptive needing to restart the PC every time the hypervisor was enabled or disabled.

The other limitation of Local by Flywheel, which I mentioned in the review I wrote is that it is WordPress only; unfortunately, TasteWP has the same limitation of being WordPress only. WordPress is obviously much larger than ClassicPress, so this is not unexpected.

TasteWP allows you to create up to two sites which will expire after 48 hours; the admin page has a counter at the top right corner showing how long you have remaining. If you create an account and sign in you can create up to six sites which expire after 7 days and if you sign up for a premium account you can also create a site which does not expire and which has a lot more space available.

TasteWP website

Continue reading “A Review of TasteWP”

Separately compress all sub folders

7-ZipI started using WordPress for this blog when it launched in June 2011 until last year when, with Gutenberg on the horizon, I migrated to ClassicPress. This migration was easy as ClassicPress is a hard-fork of WordPress 4.9. As part od the migration I opted to rewrite all of my plugins to improve them and make them more secure.

I have 32 publically available plugins for ClassicPress. I’ve recently made changes to all of the plugins which means I need to make a release of them.

This partly done by committing the changes to Git Hub and making a tag, but you also need to add a zip file. There are commands to do this automatically on GitHub, but I am quote new so am opting to create the zips myself and upload them.

To do this I wanted to automatically compress all of the plugin folders, but exclude any hidden folders (such as the .git folder). I did some exploring and found the required command on Stack Overflow using 7-zip:

for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a -xr!.git\ -xr!*~ "%%X.zip" "%%X\"

The question which had previously been asked was this one and the two answers I used were this and this.

IIS Rewrite Rule for Redirect to Directory

Microsoft Dynamics GPThe web hosat I am currently with allows multiple domains, but only 6 websites; this means I have to be a little creative sometimes when creating additional sites.

I actually have a lot more than six websites being hosted on my account, due to a mix of WordPress MU and redirects to folders.

The redirect is done using an IIS rewrite rule. As I may be moving web host soon, I’m posting this so that I have easy access should I need.

This code goes in the rewrite section of the web.config file:

/*
Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (https://www.azurecurve.co.uk)
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int).
*/
<rewrite>
	<rules>
		<rule name="Rewrite subdomain.azurecurve.co.uk subdomain to dir" enabled="true">
			<match url="^(.*)$" />
			<conditions>
				<add input="{HTTP_HOST}" pattern="^subdomain\.azurecurve\.co\.uk$" />
			</conditions>
			<action type="Rewrite" url="_subdomain.azurecurve.co.uk/{R:1}" />
		</rule>
		<rule name="subdomain.azurecurve* wordpress" patternSyntax="Wildcard">
			<match url="*subdomain.azurecurve*" />
			<conditions>
				<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
				<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
			</conditions>
			<action type="Rewrite" url="_subdomain.azurecurve.co.uk/index.php" />
		</rule>
</rewrite>

The second rule is, I believe, required specifically for redirects for WordPress sites, the majority of which my rewrites are for.

Sites Migrated to New Host

azurecurveOver the course of this weekend I have migrated my websites to a new web host; hopefully, the only difference you will notice is that the sites are now being served over an https connection.

However, if you do notice any issues, images not loading or broken links (I’ve moved from a Windows hosting package to a Linux one so case now matters) ,for example, I’d appreciate you leaving a comment below with details.

Update: I forgot to mention, that when I migrated the sites to a new host, I also migrated them from WordPress to ClassicPress.

What Will 2019 Bring For Gutenberg in WordPress

GutenbergBack towards the end of last year, I did a few posts on Gutenberg for WordPress. Since then there’s been a bit more clarity around what 2019 will bring for Gutenberg in WordPress.

A post on the Make WordPress blog explains how phase 2 will be about introducing Gutenberg to the Customizer:

Gutenberg phase 1 and 2

This means that the sidebar, widgets, and menus will all be moved to Gutenberg.

Assurances that the Classic Editor will be supported until 31st December 2021 are largely worthless, as Gutenberg will be rolling out into Customizer in 2019 and this will fundamentally change WordPress.

Themes already need to be updated for Gutenberg as a post editor; entire new themes, or huge rewrites, will be required when the Customizer changes.

ClassicPress/WordPress Usage: Add Page Breaks In Blog Posts

ClassicPressAdding page breaks to a blog post came up in discussion the other day, where someone thought it was done by adding <!--more--> to a post.

However this tag is actually used to add a break to a post in the blog index or archive pages, resulting in something that looks like this:

Blog post with more tag

Continue reading “ClassicPress/WordPress Usage: Add Page Breaks In Blog Posts”

WordPress/ClassicPress Plugin Development: Checking If Function Exists In Namespace

WordPress PluginI’ve been developing my own plugins for WordPress and, more reently, ClassicPress. At times it’s been necessary to check if a function exists.

It’s fairly straightforward to do this check:

if (!function_exists('azrcrv_get_breadrumbs')){
	// code here
}

I also use a few plugins developed by other people. One of the ones I’ve been reviewing recently is Estimated Read Time by CodePotent.

John uses namespaces in his plugins which means the check also needs to include the namespace. You can check for this using the following syntax (the highlighted section is the namespace defined in the plugin):

if (function_exists('CodePotent\EstimatedReadTime\process_shortcode')){
	// code here
}

I’m posting this as a reminder to myself as it took me a few minutes of searching before I found the right answer.

Allow WordPress to Perform Minor Updates

WordPressBack in December I posted about stopping WordPress from updating to WordPress 5 (which includes the terrible Gutenberg.

However, I realised soon afterwards that was the wrong thing to do; instead I should have allowed WordPress to perform minor updates within the WordPress 4 branch, which can be done using the below line:

define( 'WP_AUTO_UPDATE_CORE', 'minor' );

Once this line has been added to your wp.config file, WordPress 4 will be able to update to later WordPress 4 versions, but not to WordPress m5.

How To Downgrade WordPress 5.0.3 to 4.9.9

WordPressI’ve discussed before the problems WordpRess 5 and Gutenberg present me; I’ve avoided upgrading to WordPress 5 and remained on Wordpress 4.9.x as I plan my migration to ClassicPress.

Despite remaining on the WordPress 4.9.x branch and telling WordPress, via the config file, to only allow minor upgrades within that branch, the admin dashboard has a large Update Now button which will upgrade you to WordPress 5. Today I had an accident and clicked this button when I intended to click the Update Plugins button.

WordPress dashboard showing Update Now and Update Plugins buttons

Continue reading “How To Downgrade WordPress 5.0.3 to 4.9.9”

Local by Flywheel: Review

Local By FlywheelThis post is part of the series on Local by Flywheel.

Over the course of this series, I’ve installed Local by Flywheel, created and tested the default WordPress site and also accessed the local development site from the Internet.

Overall I have been very impressed with Local by Flywheel. It is a very easy installation, flexible yet simple setup and easy enough to access both internally and externally.

It would be nice, in future, to see ClassicPress available as a default install rather than having to either migrate the default WordPress one or manually replace it with ClassicPress, but that might come with time as ClassicPress grows.