WordPress Training: Vanishing Content

25 Feb

This is an issue I helped a fellow blogger out recently with content that she was trying to embed in a post in her blog, but for some reason it was not appearing in her post.

I had her send me the embed code and took a look at the code. Here’s a sample:

The code above poses a few issues for WordPress as there are a few things we have to take into account.

Your WordPress theme will have a layout for posts defined and the above code adds in a couple of divisions which are identified by the <div> tags. The div tags really aren’t necessary to display the video inside the post, and as such, we will remove them.

Once we remove them, you are left with the embed code below:

Now the code above has some issues with it as well, as your WordPress theme should be the one determining where the video sits in your post and what size it is. So in the code where you see style= is modifying the display of the video within the post.

What we need to do next is remove everything from the style except for the height and width.

 

The code above is now what we’re left with. 100% width means that the content will fill the available width of the post. Height can’t be 100% as it just doesn’t work 90% of the time. So for height I just picked an arbitrary width of 500 pixels wide but really this can be almost any number.

The product of the code above is below:

and there you have it! A working video!

WordPress Training Coming Soon

21 Feb

While running my hosting business HostingEh, I’ve had a lot of customers ask me about the possibility of training them on common WordPress problems and how to troubleshoot and fix them.

I figured that the best way to achieve this would be to write a few posts about common issues I see with customers WordPress sites, and then detail how I went about fixing the problem.

Some of the techniques I employ are ones that I’ve learned over the years as a web application developer, and others are from being a systems administrator so I will try and simplify them for people who have zero experience with running their own servers.

That being said, I am starting work on a couple of common problems and you’ll see more frequent updates here on the blog to show you how to go about diagnosing an issue, trying fixes, and eventually resolving the issue.

This series is going to take a few things into account:

  • You are in a shared hosting environment.
  • Your environment uses cPanel as the control panel.
  • Your host is running a version of PHP above 7.0

Even if the above assumptions do not apply to your situation, these posts may help, however I can’t guarantee they will.

That all being said, Stay Tuned!

It’s Been a Hot Minute

5 Aug

It’s been quite a long time since I’ve written a post on this here blog of mine and I felt like it could use some love.

I decided to try out this new Gutenburg editor and see what everyone is complaining about but to be honest, I quite like it.

It’s super minimalistic and only shows the bits of UI that you actually need while writing a post. I think this is by far the best way to write a blog post! It’s still very much what you see is what you get (WYSIWYG) but a lot cleaner and more simple.

I can see how this would be a massive change for someone who has been using WordPress since the beginning but who is not a coder, but for me this looks pretty damn good.

I just noticed that this editor is automatically placing my paragraphs into paragraph blocks and offers me a way of editing that paragraph inline. For instance if I wanted to make some text bold, I could do exactly that by simply mousing over this paragraph, selecting the text I want bold, and clicking bold.

Let’s try a link; HostingEh is my web hosting business that I run as a side project at the moment, but with continued growth, I could likely make a full time living doing. Yep. Even entering a link is dead simple!

How about a photo?

Yep even a photo again is dead simple to add inline. The last thing I’d like to see is how my theme handles this. As far as I know, my theme does not have any kind of customization handling this new editor so we will see what the finished post looks like.

Either way, this is super cool and modern. I love it.

Dear WordPress Bloggers

18 Mar

Dear WordPress Bloggers:

As a PHP developer and someone with quite a few years experience with WordPress, I would like to offer you some advice on how to run a WordPress Blog that loads quickly and looks good.

Examine Plugins and Themes Closely

If your blog is lacking a feature or option that you’re unable to code yourself, please spend some time and research any plugin that you may want to install to provide that feature or option to you.

Take a careful look at the information provided by WordPress.org. It shows active installations, last update, and even reviews of the plugin. Make sure to have a look at all of this information and consider whether or not it would be a good idea to install it.

I’ve seen far too many blogs with plugins installed that have been abandoned for several years that end up getting compromised and the end result is a hacker wreaking havoc on their WordPress site.

My advice on plugins is to only ever use plugins you truly need.

Plugins for Things That Exist Elsewhere

You know what will really slow down your admin section? Installing a plugin that shows the full Google Analytics Dashboard in your admin backend. If you find it truly inconvenient to log into Google Analytics, then who am I to stop you? Plugins like this offer no value other than convenience and have to load in a ton of extra scripts so that all the features work.

Sending Mail Through WordPress

If you have a newsletter or something of the sort where you need to send mass mail to all of your readers please consider using a dedicated service for sending mail.

Some examples are SendGrid, Amazon SES, and MailGun.

Using these services not only offer a lot more insight into your mailing list, but also keep the load of your hosts server. All of the above service providers have excellent delivery rates and all offer their own brand of stats and reporting on open rates and the like..

“Theme Developers”

If ever someone tells you that they will build a theme for you on the cheap, maybe dig a little deeper and ask some questions as to how the theme would be developed. I’ve seen far too many sites where a “theme developer” has installed a third party theme (Not one they’ve created) and used a page builder plugin to tweak the theme to a customers request.

Generally these people install a ton of bloat to support the various components that the page builder requires to operate which means when you load up your site, there is almost always a ton of bloat included.

Poorly built / coded themes are yet another reason a lot of WordPress sites are slow as molasses and take upwards of 30 seconds to load.

Cache Cache Cache

One great way to keep your site quick and your web site load low, is to cache all the things. There are a couple excellent plugins for caching with very simple options to follow. Personally I use WP Super Cache as I feel it offers effective caching and pairs nicely with CloudFlare.

In the End………

As the end of the day, it’s your web site. I can only give you the tools and experience. It’s up to you what you do with it. The faster your site loads, the more people you can serve and the more ad revenue you can make.

If you have any questions, please leave them in the comments and I will answer them as soon as I can!

Welcome to A Boy and His Blog!

7 Feb

Welcome to my updated, fresh, and clean blog!

I spend a lot of my spare time on my hosting company helping people with their blogs and getting them all set up with various items from google such as Analytics, AdSense and even GSuite (Google Apps for Domains).

I plan to cover a wide variety of geeky topics surrounding setting up blogs, getting the most out of your hosting, and what to look out for when maintaining your blog.

I’ll also be going into more detail on when you would need a dedicated server VS when shared hosting will do the job.

If there’s anything specific you’d like me to cover or that you’d like to learn more about, please do leave a comment and let me know. I have access to a wide variety of experts in a lot of different spaces and circles so if I know what the burning question is but don’t know the answer, I can get someone who does!

I’m really looking forward to getting this blog moving and shaking! See you on the internet!

-Andrew

How-To: Picking a Hosting Solution

15 Mar

Owning a hosting company allows me to see and learn a lot of things about a lot of different people, their web site, and the requirements for hosting their web site which is why I thought I would take the time to write a post about how to go about picking out a host for your site.

What are you hosting?

The first thing I would look at is what exactly you want to host. Some common things people usually want their hosting company to host for them are:

  • A wordpress blog (Most Common)
  • An E-Commerce Shop (Second Most Common)
  • A membership site (Subscription based content)

As stated above you want to get a really good idea as to what it is you want to host before even thinking about finding a host.

What kind of disk space and bandwidth do you require?

There are a ton of hosts out there that like to promise the moon and never deliver on that promise for instance a lot of hosts offer unlimited disk space and bandwidth for somewhere in the area of $3-7 per month. If you’ve ever been in the hosting business, you would know that there is absolutely no such thing as unlimited.

If ever you’ve been with the big guys and had a sudden influx of traffic, you will soon receive an email or a web site suspension notice telling you that your site is spiking the load on the server and that they had to shut you down and even then, it’s your responsibility to fix things. Your host generally will not interfere with your web site files unless it puts other customers at risk.

Bandwidth is something else that is limited to the technology available to your host and to the servers that they use. Unmetered bandwidth is something that is commonly made available which means your host generally doesn’t mind how much bandwidth you use unless you consume the entire bandwidth allotment to your server.

For most pre-made web site systems such as WordPress or ZenCart or anything similar, a good starting point is about 500MB to 1GB of space. Now if your blog is several years old with tons of posts, images, and video, this space would likely be much higher however 500MB to 1GB is a great starting point.

Bandwidth packages are usually offered by hosts in increments reflective of your hosting packages disk space. In other words if you have 1GB of disk space, bandwidth is generally something along the lines of 5X your disk space. Which would mean 5GB.

What kind of support do you need?

Do you need the kind of support that only really helps when the server has an issue? This is typically the only kind of support you get. If you want more, you pay more. So if you have a problem with a WordPress plugin, some hosts will make a best effort to try and help you out, however at the end of the day they will only try simple trouble shooting.

Other Considerations

A few other things to think about while looking for a host:

  • Do you plan to grow your audience (usually the answer is yes)
  • Do you plan to offer larger files for download?
  • Is your web site audio / video heavy?

Once you know

Once you have an idea of the above information you are now ready to start shopping for a host.

To give you an idea of what some sites go through in terms of disk space and bandwidth, I will offer some examples from my own business.

An average sized WordPress blog uses approximately 5GB of disk space and about 20GB of bandwidth which is about 4X the disk space. We offer unmetered bandwidth because in all honesty it takes a lot of traffic to use up the entire pipe that our servers use.

Summary

Researching hosts before actually committing is definitely a good idea and the more you know about your project, the more you can budget and deal hunt and if you’re looking for a deal, please feel free to reach out to me or visit HostingEh and see if we can offer something that suits your needs!

A Blog from Scratch (Part 1)

26 Feb

For the longest time now I’ve been trying to convince Jenn (my wife) to start a blog and share some of the stuff she makes or wants to make with other people out here on the internet.

Finally she has come around to the idea of running a blog of her own and sharing some of the great stuff she does, so I thought I would write a series detailing what I’m going to do to get it all set up for her so she’s ready to just focus on her blog.

There are a few things required to get started with a self hosted blog. You can always set up a free one on WordPress.com or Blogger.com but for the sake of total control and simplicity going forward, we will be self hosting this blog.

What we’re going to need:

  • A domain name.
  • Cloudflare
  • A server
  • WordPress
  • A theme
  • Adsense (to start with)
  • Analytics (stat tracking)

The domain name has already been purchased and set up with Cloudflare.

Dedicated Server

I opted to get a dedicated server for a couple of reasons.

  1. I wanted to host my blog and my wifes blog on a single machine.
  2. Dedicated resources where we don’t have to worry about CPU / Memory abuse.
  3. Ability to use whatever database and caching we want.
  4. More reliable than a shared host. (No noisy neighbor problems.)

The dedicated server we went with is from Hudson Valley Host. Their pricing is fantastic and they have a diverse selection of locations.

Stat Tracking

Setting up a google adsense and analytics account is pretty straight forward. This information will come in super handy to see things like what your most popular content is and what your readership is like.

WordPress + Theme

I usually recommend people look at the free themes offered at WordPress.org/themes first to get an idea of what they want and whats available. You can also look around at places like ThemeForestΒ for more advanced paid themes.

Once you’ve made all of your choices and set up all of your accounts, you’re ready to get your blog going!

Up next: Setting up a dedicated server to host a WordPress site.