I’ve been hosting my WordPress sites with Digital Ocean for a few months now. It took me quite a while to learn how to manage everything, and I thought it would be worth sharing a few shortcuts and tricks I’ve picked up.
WordPress 4.1 introduced a new function to display archive pagination as numbered links. Developers have been making this work for long time using custom functions or popular plugins like WP Page Navi, so its great to now have a core function for this purpose. Continue reading →
Working with the command line can be intimidating if you’re used to a nice graphical user interface (GUI), but it’s worth getting familiar with. There’s a lot of mundane tasks in web development can be automated with good set of scripts and shortcuts.
It’s also often much faster and simpler to accomplish a task with the command line, and in this respect WordPress is no exception. WP-CLI makes it possible for you to get your WordPress related tasks done with the help of a set of commands.
You might have a natural question in your mind: if the WordPress admin interface is so gorgeous and user-friendly, why would someone like to use the command line interface? There are two key reasons:
People find keyboard faster than the mouse: Instead of using mouse, a power user always prefer to use keyboard shortcut to accomplish a task. In general, using keyboard shortcuts is 3 times faster than clicking a mouse.
Automation:To make several commands execute automatically, you just need to put them into a single text file. Automation saves a lot of your precious time.
So in this guide, I’m going to give you a taste of WP-CLI: a command line interface for administering WordPress sites. Continue reading →
It’s surprisingly difficult to disable comments globally in WordPress.
Comments can be turned off for new posts in “Settings > Discussion” screen. However, all previously published posts would still retain their comment settings and need to be disabled individually under the “Discussion” metabox on the post edit screen (which can be very time consuming).
Disable Comments with One Click
The easiest way to turn off comments globally is actually with a plugin called “Disable Comments”, which is a free download from wordpress.org.
After enabling the plugin, you can choose to disable comments everywhere or only for specific post types. If you want the changes to be permanent, choose the “persistent mode” option before saving.
If you have chosen to make the changes permanent, the plugin can be deleted after you save the settings.
If a site was abandoned for a while or suddenly got hit by a lot of comment spam, you might want to delete all the pending comments or spam comments. For both of those scenarios, you can use a plugin called Delete Comments By Status.
Delete Comments By Status also allows you to delete “trash” comments and “approved” comments in bulk.
After enabling the plugin, go to “Settings > Delete Comments”.
If an excerpt is explicitly defined, it will be displayed (including HTML).
If an excerpt isn’t defined, the post content will be used, but stripped of HTML and truncated to 55 words by default. An indication that is has been truncated also displays “[…]”.
If a post consists entirely of a YouTube embed, a gallery, a single image, or a Tweet embed, “the_excerpt” will strip all that out- and thus nothing will be displayed. This makes for a very weird looking archive page if the_except is used.
The alternative is to use the_content. This allows the full content to show. But the content can also be truncated on archives by using more tag.
This is what I’ve been using in most of my new themes as it is the most flexible. Continue reading →
I’ve had a number of tiny WordPress sites on shared hosting (BlueHost) for over a decade. It’s been pretty great. Shared hosting has a lot of benefits: it’s cheap, it’s relatively easy to manage, e-mail is included, and there’s basic support.
The drawback is that servers aren’t generally optimized for WordPress performance, and once a site begins to scale in traffic you need to move it to a managed host or a VPS.
I’ve been wanting to try DigitalOcean (one of the many cloud providers) because my hosting bills have been growing. I still have my basic shared hosting with BlueHost, but I also have large sites on WP Engine, and a VPS with WiredTree. They’ve all been great and have their own benefits, but the idea of consolidating into one provider and reducing my hosting bill significantly is a huge draw. Continue reading →
In that case, you will need to temporarily switch themes (perhaps to the default). Find the theme you want to replace, click “Theme Details” and then click “Delete”. Now you can upload the newer version.
If you use WordPress.com, you cannot upload your own themes.
If your zip file contains multiple themes, you’ll need to unzip it, and then re-zip each theme individually.
Purchase themes only from trusted sources- otherwise you run the risk of getting a hacked version (no fun).