<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: T(h)om</title>
    <description>The latest articles on DEV Community by T(h)om (@tomastley).</description>
    <link>https://dev.to/tomastley</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F246215%2Fb0a26400-6c43-44f6-8950-a09f4dd542b8.jpg</url>
      <title>DEV Community: T(h)om</title>
      <link>https://dev.to/tomastley</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tomastley"/>
    <language>en</language>
    <item>
      <title>Opinions on hidden menus. Yay? Nay?</title>
      <dc:creator>T(h)om</dc:creator>
      <pubDate>Thu, 30 Apr 2020 15:51:36 +0000</pubDate>
      <link>https://dev.to/tomastley/opinions-on-hidden-menus-yay-nay-3a8l</link>
      <guid>https://dev.to/tomastley/opinions-on-hidden-menus-yay-nay-3a8l</guid>
      <description>&lt;p&gt;Hiding the main menu within a hamburger or similar is relatively commonplace on the web these days. You generally see it on modern sites or sites that are targeting a younger demographic. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The question is, does hiding the menu degrade the user experience?&lt;/em&gt;&lt;/strong&gt; I get asked this question regularly, and my answer is, it doesn't hurt UX at all. We've had enough exposure to this concept that I believe that &lt;strong&gt;&lt;em&gt;most&lt;/em&gt;&lt;/strong&gt; users will grasp this kind of functionality.&lt;/p&gt;

&lt;p&gt;When I did a quick search on the internet for opinions, I didn't find much, but I did get a sense that people are split 50/50. What I did discover was this &lt;a href="https://www.nngroup.com/articles/hamburger-menus/"&gt;study&lt;/a&gt;, which was written in 2016. &lt;/p&gt;

&lt;p&gt;The benefits of hiding the menu are purely aesthetic. It's also important to note that if you were to hide the menu in any sort of way you should provide alternatives for navigation, for instance, placing top tier pages as links in the footer and linking to content via the body.&lt;/p&gt;

&lt;p&gt;So, &lt;strong&gt;&lt;em&gt;Yay?&lt;/em&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;em&gt;Nay?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ux</category>
      <category>webdev</category>
      <category>design</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Improving your WordPress development experience</title>
      <dc:creator>T(h)om</dc:creator>
      <pubDate>Tue, 22 Oct 2019 19:25:48 +0000</pubDate>
      <link>https://dev.to/tomastley/improving-your-wordpress-development-experience-eae</link>
      <guid>https://dev.to/tomastley/improving-your-wordpress-development-experience-eae</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;a href="https://unsplash.com/photos/Zk--Ydz2IAs"&gt;Photo by Fikret tozak on Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every once in awhile, I'll stumble on an article/rant about how horrible WordPress is. Developers will complain about all facets of the CMS from security, plugin conflicts, performance, and templating. I noticed a common thread with some of these posts, and that was just how unclear people were on how to develop with WordPress effectively. I want to provide my learnings to course correct some of these attitudes. I have developed dozens of sites in WordPress over the years and learned a great deal. I can give some insight on how to make your development experience more pleasant.&lt;/p&gt;




&lt;h2&gt;
  
  
  Select the right template
&lt;/h2&gt;

&lt;p&gt;This might be the most crucial tip. If you select a template that is hard to use or inflexible, you're not going to be successful. There are hundreds of templates out there, and some provide fully baked styles for you, while others are bare bones. In my option, a barebone template is the way to go, and Sage, by &lt;a href="https://roots.io/sage/"&gt;roots.io&lt;/a&gt;, is the way to go. A few key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Webpack frontend workflow&lt;/li&gt;
&lt;li&gt;The ability to pick either Bootstrap 4, Foundation, Tachyons, Bulma and Tailwind frameworks&lt;/li&gt;
&lt;li&gt;Laravels Blade templating engine&lt;/li&gt;
&lt;li&gt;Controllers to get a handle your data&lt;/li&gt;
&lt;li&gt;Great documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Careful with your plugins
&lt;/h2&gt;

&lt;p&gt;While developing a WordPress site, it's easy to go overboard with plugins; after all, they do add functionality and make things easier. One of the biggest pitfalls is to install too many plugins or plugins that are not well supported. When selecting a plugin, check the following.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Has it been tested on your current version of WordPress?&lt;/li&gt;
&lt;li&gt;How many downloads has it had? If it has a few thousand downloads, this could indicate a reliable and useful plugin.&lt;/li&gt;
&lt;li&gt;Check the version history. This can provide insight into the direction of the plugin and how quickly the developer addressed bugs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Plugins are certainly a necessary part of the WordPress development, but it's crucial not overdo it. Too many plugins can cause performance issues and incompatibilities. Ask yourself, do I need this plugin?&lt;/p&gt;

&lt;h2&gt;
  
  
  Security
&lt;/h2&gt;

&lt;p&gt;The fact is that Wordpress powers 30% of all websites on the internet! That is a staggering number of sites. Unfortunately, this makes WordPress a popular platform for hackers to exploit. But there are a few things you can do to protect yourself.&lt;/p&gt;

&lt;p&gt;Download and install &lt;a href="https://www.wordfence.com/"&gt;WordFence.&lt;/a&gt; Utilizing its Web Application Firewall it will protect you from Brute Force attacks and complex attacks while blacklisting those offending IP's. It also keeps an eye on your plugins for updates and vulnerabilities. WordFence provides a host of additional features not mentioned here. I suggest checking out there website for the full rundown of its capabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Protect your site&lt;/strong&gt;&lt;br&gt;
There are so many ways to do this, but I will cover just some basic things to keep in mind.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Do not use the wp_ prefix for your database. It's a default WordPress setting, changing this could stop attackers selecting tables in your database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;During install, WordPress will provide a default username for an administrator as "Admin." Attackers attempting to break into your site will always try to use "Admin" as the username while guessing the password.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check your server firewall. Make sure only the necessary ports are open.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check permissions on your WordPress files. Make sure your files are not owned by root and the correct file permissions are set. For more information on this visit: &lt;a href="https://wordpress.org/support/article/hardening-wordpress/"&gt;https://wordpress.org/support/article/hardening-wordpress/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make sure your version of WordPress and plugins are up to date. WordPress makes it easy to update; you can even make these updates automatic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strong passwords! It's just common sense these days. Make sure all user passwords are strong.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Effective and trusted plugins
&lt;/h2&gt;

&lt;p&gt;There are thousands of plugins out there to choose from it's hard to know which ones to use. Here's a shortlist of the ones I regularly use and have had great success.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.wordfence.com/"&gt;WordFence&lt;/a&gt; (As mentioned previously, a must for security)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.advancedcustomfields.com/"&gt;Advanced Custom Fields&lt;/a&gt; (Easy to use with incredible flexibility)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://wordpress.org/plugins/wp-migrate-db/"&gt;WP Migrate &lt;/a&gt;(Migates your database)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://yoast.com/wordpress/plugins/seo/"&gt;Yoast&lt;/a&gt; (For all your SEO needs)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://wordpress.org/plugins/contact-form-7/"&gt;Contact Form 7&lt;/a&gt; (5 million activations for this plugin, a must for contact forms)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://wordpress.org/plugins/cookie-law-info/"&gt;GDPR Cookie Consent&lt;/a&gt; (Easy to configure and use if you are worried about GDPR)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://getblocklab.com/"&gt;Block Lab&lt;/a&gt; (Build custom Gutenberg blocks)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Consider this article just a general guide of best practices and advice for those working with WordPress. There are a multitude of things one could do to increase performance, enhance usability, and bolster security not covered here.&lt;/p&gt;

&lt;p&gt;WordPress might not be the sexiest CMS out there, but clients request it because they are familiar with it and find it easy to use. And this is so important. Hopefully, this little post will help others develop more secure and better WordPress sites.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>cms</category>
      <category>webdev</category>
      <category>security</category>
    </item>
    <item>
      <title>Running Wordpress locally with Docker </title>
      <dc:creator>T(h)om</dc:creator>
      <pubDate>Mon, 14 Oct 2019 17:54:57 +0000</pubDate>
      <link>https://dev.to/tomastley/running-wordpress-locally-with-docker-1g02</link>
      <guid>https://dev.to/tomastley/running-wordpress-locally-with-docker-1g02</guid>
      <description>&lt;p&gt;I've been doing several Wordpress sites recently, and I've been using Docker to manage this on my local machine. Over time I made some improvements to the process, and I decided to share my Docker build I use that I find useful. It may not fit everyone's needs, but certainly, to get started with a local build, it works well.&lt;/p&gt;

&lt;h3&gt;
  
  
  How it works
&lt;/h3&gt;

&lt;p&gt;(straight from the repo's readme)&lt;br&gt;
Setup will do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build Wordpress Docker container&lt;/li&gt;
&lt;li&gt;Build MySql Docker container&lt;/li&gt;
&lt;li&gt;Downloads the Sage template and install via composer&lt;/li&gt;
&lt;li&gt;Install template dependencies via Yarn&lt;/li&gt;
&lt;li&gt;Compiles assets via Yarn&lt;/li&gt;
&lt;li&gt;Install an SSL Cert&lt;/li&gt;
&lt;li&gt;Get the latest database from the remote (if not a new build)&lt;/li&gt;
&lt;li&gt;Update database paths&lt;/li&gt;
&lt;li&gt;Get uploads from the live site. (if not a new build)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope this helps. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/TomAstley/Docker-Wordpress-for-dev"&gt;Link to the repo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>wordpress</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The development graveyard</title>
      <dc:creator>T(h)om</dc:creator>
      <pubDate>Wed, 09 Oct 2019 22:10:04 +0000</pubDate>
      <link>https://dev.to/tomastley/the-development-graveyard-4c21</link>
      <guid>https://dev.to/tomastley/the-development-graveyard-4c21</guid>
      <description>&lt;p&gt;Most web developers will sympathize with this.&lt;/p&gt;

&lt;p&gt;You’re working on an exciting personal project utilizing the latest and greatest framework. The late-night hours you have spent are paying off, and despite your fatigue, you are adamant to complete it and share it with the world. But then life happened. Work becomes pretty intense and the mere idea of opening up your laptop when you get home makes you anxious and break into a cold sweat. Sound familiar?&lt;/p&gt;

&lt;p&gt;A month or two pass, your job has settled down and you can now find the time to dive right back into your project, but there is a problem. The code you wrote back then was under thought, you have no idea where to start and the project does not capture your attention anymore. Put simply, you lost momentum and focus.&lt;/p&gt;

&lt;p&gt;These kinds of projects eventually end up in what I call the &lt;strong&gt;Development Graveyard&lt;/strong&gt;. A place where a project dies and often never get resurrected. This may seem like a bad thing but in reality, it’s not, allow me to explain.&lt;/p&gt;

&lt;p&gt;Your graveyard can be a source of learning, reflecting and aid you in your current web development projects.&lt;/p&gt;

&lt;p&gt;Regardless of how bad or incomplete these projects may seem to be, they provide a treasure trove of great code references. This code can likely help you with your current projects. Sometimes just seeing old code can give you an altered perspective to solve current development problems.&lt;/p&gt;

&lt;p&gt;The same goes for your job. Your client could be asking for something very specific and you just happened to build something like this a year ago. Since you have a development graveyard in place, your ability to use it as a valuable resource. Imagine the time savings if you were able to leverage some of your old code. Your boss will love you!&lt;/p&gt;

&lt;p&gt;Finally, it shows how you have progressed over time which makes you feel accomplished. I often look back at my old work and can’t believe how I have come and how far technology has progressed. Take this a confidence booster and a learning tool.&lt;/p&gt;

&lt;p&gt;If you have a graveyard already or would like to bury some old work, I would suggest adding a readme file, so you can get a quick summary of what you are working on. Some of you might be doing this already. But there is nothing worse than looking at a codebase and wondering what the heck it is for what it does. And of course, store it in a repo.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Personally, my graveyard is sprawling. But it serves as a place to visit when I forgot how to do something. Or when I need a little inspiration. But it would be nice to not send projects out to pasture, wouldn’t it? Of course, and that’s for another post I’m writing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Celebrate your graveyard. Visit it often and learn from it.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>sideprojects</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
