WordPress is the most popular CMS (content management system) available today, currently powering over 30 percent of all sites online. Itâs an incredibly diverse platform that allows you to meticulously craft a site to fit your needs.
In this intermediate guide to using WordPress, weâll go deeper down the rabbit hole of using the platform. Weâre going to take a look at search engine optimization, decreasing load times on your site, dealing with WordPress in a day-to-day setting and solving some common WordPress issues.
Depending on where youâre at, this guide may be a bit too simple or too complex. We have two other guides for WordPress, so make sure you check those out after getting through this one:
WordPress and Search Engine Optimization
While not specific to WordPress, SEO (search engine optimization) is a huge part of using the CMS. As mentioned in our beginnerâs WordPress guide, the Yoast SEO plugin is an essential tool to ensure you gather traffic organically from search engines. Weâre going to run over the basics of the plugin, as well as some best practices for SEO in general.
Search Engine Indexing
Before you can do any SEO, youâll need to submit your site for indexing. Weâre going to run over Google indexing in particular, but there are separate steps for other search engines. First, go to the Google Search Console and sign in with a Google account.
Once inside, click on âadd a propertyâ and submit it for indexing. Do note that youâll need to type out the full URL of your site, including the protocol. For instance, if you have an SSL certificate, youâll need to add âhttps://â to the front of your URL.
A new window will open with two tabs. Click on âalternative methodsâ and check the box âHTML tag.â Youâll see a full script to place in your header, but you donât need all of it for Yoast SEO. Instead, copy the code in parentheses after âcontent=.â
With that code still on your clipboard, head back to WordPress and make sure you have the Yoast SEO plugin installed. In your left-side toolbar, click on the tab labeled âSEO.â In the next screen, click on âwebmaster tools.â
Paste the code in âGoogle verification codeâ and save the changes. There are also slots for Bing and Yandex codes. Go back to the Google Search Console and click âverify.â After that, youâve officially verified that youâre the owner of the domain, but havenât actually submitted your site for indexing. For that, youâll need to submit a sitemap.
Yoast SEO automatically generates a sitemap for you. Basically, itâs an index of all your web pages that allows Googleâs bots to crawl your website and find information for indexing.
Adding one to Google Search Console is as simple as ever. Go back to your console and delete all outdated or invalid sitemaps. Next, click on âadd/test sitemapâ in the top right corner. Enter âsitemap_index.xmlâ and submit it. Over the course of a few days, Google will begin crawling your site and indexing pages and posts into search results.
The sitemap index Yoast creates includes everything about your site, including topics, categories and forums. If you donât want everything to turn up in search results, then you can configure your sitemap within WordPress.
Go back to Yoast SEO tab and click on âsearch appearance.â Next, click on âcontent typesâ to see all of the different sitemaps in your index. You can individually turn off any of the sitemaps as well as set a title and meta description template. Youâll want to poke around this area a bit more as it has settings for how youâll show in search results and RSS feeds.
Optimization for Search Engines
Now that youâre indexed, you can start optimizing your posts for search rankings. This is a pretty dense topic, so weâll just run over the basics of how you can use the Yoast SEO plugin to help your search rankings.
Under every post and page, youâll have a box for SEO. There are two tabs: keyword and readability. Readability is an automated analysis of how simple your content is to read with some recommendations on how to improve your score. The quality of content factors into Googleâs rankings so pay close attention to this section.
Next is your keyword. This is the center of all SEO, the keyword or phrase that tells search engines what your content is about. Youâll want to pick something thatâs relevant to your topic, but not too broad. For instance, if you were writing a post about how to make homemade pizza, then âhomemade pizzaâ would be a far better keyword than just âpizza,â and âhow to make homemade pizzaâ even better.
Youâll want to use your keyword in a few areas. The post title, URL, meta description and actual content should all contain the keyword. Donât, however, stuff it in the content in an attempt to gain a higher search ranking as Google has taken steps to alleviate this sort of practice.
After setting everything up for SEO, youâll get a score, either red, orange or green. There are some suggestions below the content area on what you can do to improve the SEO of a particular topic, though you should take some with a grain of salt.
For instance, a news website that publishes articles under 300 words often will likely be docked in the Yoast score for the content being too short. In this case, the problem Yoast states isnât necessarily a problem, so use your best judgment when reading through these.
Thatâs about as basic of an understanding of SEO that we can give in this guide. Googleâs system is constantly changing, so itâs important you stay up to date with what Google bots look for when scanning the content of your site.
There is one glaring issue from all the power of WordPress. The platform can easily slow to a crawl when bogged down by too many plugins, extravagant themes or unnecessary design elements. In this section, weâre going to help you cut the fat so WordPress runs smoothly without looking out of date.
Images are your worst enemy when it comes to load time. You could have decades worth of articles stockpiled within your site and still not cause as much of a hurdle as a bundle of images does. You must optimize your images to reduce the file size as much as possible without sacrificing quality.
That starts with the images youâre actually capturing. We recommend .png files for screenshots or any digital image. The high resolution of most modern displays will cripple under the compression of a .jpg, leading to fuzzy images that are difficult to read. If youâre designing graphics, .jpg works, but weâd recommend an .svg (vector) file.
Next are the dimensions of the file. However, dimensions arenât the same as resolution. Weâll talk more about that in a bit. Depending on your theme, your text area will have a maximum width. For most, itâs somewhere around 600-800 pixels.
Your theme should resize any large image to fit the width of the content area. Even so, that full file is stored on your server. To reduce the file size as much as possible, drop down the width to at least 800 pixels. You can do so in any image editor, even the included one on Windows.
Resolution is not the same as dimensions, though. Your resolution refers to the pixel count of the image. For most web use, 72 PPI (pixels per inch) works fine. Itâs unlikely your file will ever be printed and, thus, doesnât need a higher resolution. A higher resolution leads to a larger file and longer load time even though the quality isnât impacted at all.
Up to this point, weâve been specifically talking about any digital image whether itâs a screenshot or graphic. If youâre using photographs, though, the mentality is a bit different. jpgs work better for photographs. The colors are much more complex, making the wide color space of .jpg ideal for compression. Unlike digital work, youâre not dealing with ultra-straight lines and text either.
Before even uploading your image, make sure to optimize it beforehand by reducing the file size through resolution and dimension cuts. As a rule of thumb, any digital image measuring 800×500 pixels with a resolution of 72 PPI saved as a .png should be fine for web use. If you need a large feature image, then bump the dimensions up until it looks good on your theme.
The battle isnât over, though. There are still some savings to be had on the WordPress end. Using an image optimization plugin, you can trim down on the file size of images, usually saving 30 percent or more. Here are a few recommendations:
Images are the largest offender when it comes to optimization, but there are a few other things you can do to speed up your site even more. The WP-Optimize plugin cleans up all the leftovers in your site, decreasing load times for your visitors and speeding up the workflow in the backend of WordPress.
Essentially, WordPress stores everything your site creates. Thatâs nice for not losing any work, but it bulks up your system. Things like post revisions, unapproved and spam comments, pingbacks, trackbacks and expired transient options all take up space in your database.
WP-Optimize allows you to automatically delete all of these with a single button. You can check what you want saved and what you want gone and let the plugin handle the rest.
The important thing about this plugin, though, is that it scans the tables of your MySQL database. As you add, delete and move around content on your site, your table will become more cluttered and less focused. WP-Optimize goes in and cleans out all the junk so you have maximum efficiency.
There is, however, a chance it can delete something crucial to your site. While highly unlikely, the plugin is fully automated and mistakes sometimes happen. Thankfully, it includes a feature to backup your site via UpdraftPlus prior to your optimization.
UpdraftPlus integrates with platforms like Google Drive, Dropbox and Rackspace as well so you can conveniently access your backups in the event something goes strange. To learn more about these cloud storage providers, read our Google Drive review and Â Dropbox review.
Database optimization doesnât have as large of an impact as image optimization in terms of speed. It does, however, make the WordPress backend feel more fluid while opening up some space on your server.
Web Hosting Optimization
The last step in optimizing your site is to look at the home in which it lives. Web hosting is a critical part of how smoothly WordPress sites run, a big reason why itâs a bad idea to host your own website. Server-side optimization can help you with faster load times and increased security.
Most WordPress plans, outside of the egregiously expensive Pagely (read our Pagely review), use a shared architecture where multiple users live on the same server, passing the resources around. If thatâs the case, youâre looking for a low-density server, one with a fewer number of users so you have greater access to resources. For example, Bluehost (read our Bluehost review) uses low-density shared servers for WordPress plans.
Some providers such as DreamHost (read our DreamHost review) offer VPS (virtual private server) plans for WordPress instead. Itâs like a shared server, but you get a static amount of resources for your site increasing the consistency in load times.
Next, youâll need to track down some sort of caching plugin. Many web hosting providers include a caching plugin with a WordPress subscription, such as SiteGround (read our SiteGround review). It temporarily stores data in order to speed up load times, especially in locations far away from the server.
Caching is a huge part of optimizing your site. It essentially serves up a static version of your site so the server doesnât need to fetch content every time your domain is entered. While web-host developed caching plugins are your best bet, there are some free ones in the WordPress plugin directory:
Here, you want to use the best web hosting for WordPress to find any sort of performance gain, even if its small. Often shaving fractions of a millisecond can help search rankings and make your website feel that much more responsive.
Managing Your WordPress Site
Day-to-day use of WordPress requires a few skills outside of crafting posts and optimizing content. In this section, weâll look over how to get all of the statistics for your site, edit your look with child themes and deal with comment spam.
Installing Google Analytics
Google Analytics is a critical tool for running any website. Analytics brings a comprehensive view of your site, providing deep information on the makeup of your readership. To take full advantage of the service, we recommend taking the free Google Analytics certification.
Installing Google Analytics on your site used to be a nightmare. However, the MonsterInsights Google Analytics plugin makes it far simpler. Before installing that, though, you first need to sign up for an Analytics account.
Head to âanayltics.google.comâ and sign up for an account if you havenât already. Make sure you enter all the correct data for your site as well as your timezone as it can have an impact on your stats. Once thatâs done, click on âget tracking ID.â
Leave this section for now, but keep the tab open. Head back to your WordPress dashboard and install and activate the MonsterInsights plugin. Once itâs completed, go into its settings and click âauthenticate with Google account.â Be sure youâre logged into the Google account associated with your Analytics.
Follow the prompts and it will show you a code to copy. Copy and paste it in the right area and Analytics will now be tied to your WordPress account. You donât need your tracking ID for this method, but we told you to keep it open for a reason.
Another way to install Analytics is with the Insert Headers and Footers plugin. This plugin is particularly useful as it allows you to insert any script into your header without messing with your theme. For instance, if you want Analytics and Facebook Pixel tracking, you could place both scripts here.
Open your Analytics tab and copy your tracking code. Back in the WordPress dashboard, follow âsettings > insert headers and footers.â Paste the code in the top of the headers section, wait a few minutes and the code will begin reporting to Google.
If in the future you want more scripts in your header, just place them underneath the Analytics code. Leave a blank like after â<script>â and paste it down under.
Dealing with Child Themes
If youâve updated a third party theme, youâve probably noticed the phrase âchild themeâ thrown around. This derivative of the main styling of your site allows a safe environment that changes the overall functions and style of your site while maintaining a failsafe. If you want to do any sort of aesthetic modification, then we highly recommend you use a child theme to do so.
The idea of a child theme is fairly simple. Essentially, itâs a seperate area for your function.php and style.css files that looks towards a parent theme for its script. It allows you to make changes to the scripting of your site while still inheriting everything else from the parent theme. With this, you can make all the changes you want to your site while maintaining the ability to upgrade and restore the parent theme.
Creating a child theme if fairly straightforward, although it’s not for everyone. Weâll talk more about some of the drawbacks in a bit, so make sure to read through this section to learn if you should create one.
All you need for a child theme is a style.css file to point back towards the parent theme. Access your WordPress via FTP and create a new directory in âpublic_html/wp_content/themes.â Create the new directory with your theme name and â-child.â For this tutorial, weâll use WordPressâ Twenty Fifteen theme and create a directory named âtwentyfifteen-child.â
Open NotePad or any text editor and paste the following:
Theme Name: Twenty Fifteen Child
Theme URI: http://example.com/twenty-fifteen-child/
Â Twenty Fifteen Child Theme
Author: John Doe
Author URI: http://example.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fifteen-child
Of course, replace everything with relevant information for your theme. Not everything here is required, though. License, license URI, tags, text domain and Author URI are all lines you can omit from the stylesheet file. These are just used to provide data for the theme in the WordPress dashboard.
There are only six important elements when creating a child theme that are essential to make it function:
- Theme Name: This is the name that will show up for your theme in the WordPress dashboard. Not critical, but you need a way to find your child theme.
- Theme URI: This points to a demonstration of the theme in question. In most cases, your theme provider should have a test site you can enter here. WordPress will not accept the theme unless this line is present.
- Description: Like the theme name, this provides the details about your theme when you click on âtheme detailsâ in the WordPress dashboard.
- Author: The person who created the team which could be you or your frameworkâs developer.
- Template: This is the single most important line of the file. This is what parent theme the child theme will look towards. Enter the name of the parent theme you want to use as itâs displayed in FTP. In this case, itâs not âTwenty Fifteenâ but rather âtwentyfifteen.â
- Version: Just an indication of what version of the theme youâre on in your WordPress dashboard.
Save and upload this file to the child themeâs directory and refresh your web page to see the change reflected in WordPress. If you jumped ahead and activated the theme, youâll still see your site, but it may look a bit broken. Thatâs because your child theme folder needs a functions.php file as well.
Essentially, this file fundamentally changes how your WordPress site looks and behaves. Youâll need to create a seperate one for your child theme in order to get all of the functionality of your site back. Even if everything looks fine, itâs recommended you do this.
Open a text editor and paste the following script:
//* Code goes here
Thatâs it. Save it as function.php and youâve successfully created the file. However, you need to add a function in order to tie your parent and child themes together. In the âcode goes hereâ section, paste the following:
add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_styles’ );
Â Â wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
Save the file and everything should return to normal. If that doesnât work, you can inherit the parentâs styling through the style.css file, although this method isnât officially recommended by WordPress. Open your style.css file and paste the following before the close:
You donât actually need to put a full directory hierarchy here. Simply replace âtwentyfifteenâ with your parent themeâs directory and you should be good to go. This is the old way to go about things and can cause some performance issues, but still works if the primary method wonât resolve.
These are the two main files youâll edit for you child theme, but you can copy any other file into your child theme folder to make edits. For instance, header and footer modifications require a seperate file in the child theme folder.
When You Shouldnât Use a Child Theme
Now, creating a child theme isnât the best option for everyone. If you donât really want to change anything on your site as far as the theme goes, then thereâs no reason to create one. On the other side of the spectrum, if you want to change too much, then itâs best just to develop a theme from scratch using a framework.
A framework is the foundation for any WordPress theme and you need to ensure yours has a strong one before going into deep development. For instance, the Gloria magazine theme uses the Redux framework which has a lot of options for customization. Weâll talk more about frameworks and developing your own theme in the next guide.
Youâll need to know some CSS/HTML to edit your child theme and, unfortunately, we canât fully teach you the language here. We did, however, want to provide a short tutorial to demonstrate the power of a child theme. Weâre going to replace the default WordPress logo in the dashboard with whatever logo you want.
First, create your logo and save it as a .png file that’s 16×16 pixels in size. For this tutorial, weâre going to name it âcustom-logo.png.â You can name it whatever you want, just make sure to update the script accordingly.
Connect your site via FTP and get into your child theme directory. Create a new folder named âimages.â Open up the function.php file to edit it. Paste the following below any custom scripts you already have:
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before
background-image: url(‘ . get_bloginfo(‘stylesheet_directory’) . ‘/images/custom-logo.png) !important;
background-position: 0 0;
color:rgba(0, 0, 0, 0);
#wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon
background-position: 0 0;
//hook into the administrative header output
Refresh your WordPress dashboard and you should see your new custom logo appear in the top right corner.
Comment spam is a part of life for any WordPress site. You wouldnât believe the number we get here at Cloudwards.net every single day. However, there are some ways to filter comments so that you have as little spam as possible showing up on your WordPress dashboard.
Usually, comment spam is a result of trying to gather backlinks. Spam bots will go all across the internet, commenting posts with backlinks contained in them in an attempt to improve search rankings. Google has already done a lot to ensure that this kind of black-hat SEO doesnât improve rankings, but spammers still spam.
Every version of WordPress comes default with Akismet Spam Filter, a plugin that goes through all comments on your site and trashes any it thinks are suspicious. It uses machine learning, gathering data from all sites using the plugin to continually make its detection more intelligent.
Basically, it will go ahead and quarantine any comments it thinks are spam. Because of that, itâs important you go through and mark each one as either spam or not spam. That way, the system can become more intelligent ensuring non-spam comments get through and spam comments are left by the wayside.
Outside of Akismet, there are a few things you can do to get rid of spam and make the process for real commenters simpler. The first is your comment blacklist. This tool will automatically remove and mark comments as spam if they contain certain keywords. You can find the blacklist at âsettings > discussion.â
Be very careful here, though, as the filter looks for not just the keyword, but words similar to the keyword. The WordPress Codex entry gives the example of the word âtramadol.â The black list will automatically delete any comments containing tramadol, tramadols, bigtamadol, etc. However, if you blacklist a word like âass,â the filter will automatically remove comments with words like assistance, passionate, assumption, etc.
While it can get time consuming, itâs also a good idea to moderate all comments on your site. Youâll have to manually approve each, but it ensures no spam gets through. Follow the path âsetting > discussionâ in your WordPress dashboard and check the box âan administrator must approve the comment (regardless of any matches below).â
In this same area, you can allow WordPress to automatically approve comments from commenters who have been approved before. Check the box âcomment author must have a previously approved commentâ and those comments wonât show up in your moderation panel.
If you donât have Akismet or what to experiment with other plugins for dealing with spam, there are a ton of options. Here are some of our recommendations:
Common WordPress Errors
While weâd love to cover every possible error WordPress can offer up, itâs simply not possible. There are too many circumstances and too many errors to go through that even finding what you need would be a nightmare. Instead, weâre going to cover some of the most common WordPress errors and what you can do to fix them. If you donât find what you need here, make sure to refer to the WordPress Codex entry on the topic.
Internal Server Error
The most common error youâll run across is an internal server error. When you try to connect to your domain, youâll see a page with either âinternal server errorâ or â500 internal server error.â The good news is, your site isnât gone. The bad news is that this is a generalized error because WordPress canât identify the problem.
There are a few things you can do to troubleshoot it, though. The first area to check is the .htaccess file as itâs likely corrupted. Log in to your site via FTP and find your .htaccess file. It should be sitting in the root directory of your site, inside âpublic_html.â If itâs missing, make sure to read up .htaccess files in the WordPress Codex.
Rename the file to â.htaccess_oldâ and try reloading your site again. If it works, go to âsettings > permalinksâ and reset your permalinks. This will generate a new .htaccess file and replace the corrupted one. If that didnât work, continue on.
In the event your .htaccess file is fine, one or more plugins are probably the issue. Log in to your site via FTP and navigate to the âwp-contentsâ folder. Find the folder named âpluginsâ and rename it to âplugins.hold.â
Go back to your web browser and go to âwww.yourdomain.com/wp-admin.plugins.php.â Doing this will disable all of your plugins but retain their installation and settings. Go back to the FTP manager and rename âplugins.holdâ to âplugins.â After that, you should regain access.
Reactivate plugins one by one and see where the error lies.
If you want to do it without FTP access, go to your webhost and use phpMyAdmin. Find the table named âwp_options.â Under the column âoption_name,â find the âactive_pluginsâ row. Change the âoption_valueâ field to âa:0:â and try logging in again.
The same process goes for themes. Find your themes folder in your file manager and try uploading the default Twenty Sixteen WordPress theme, deleting your current one.
If all else fails, contact your web hostâs support and they can help you do a fresh install of WordPress or increase your memory limit to see if that brings your site back online.
Connection Timed Out
If you get a screen with âerror establishing database connection,â than that means your site is having trouble connecting to the database itâs associated with. There are three main reasons for this:
- Web hosting error
- Incorrect wp-config.php information
- Hacked website
In the majority of cases, this error comes from a simple web hosting problem. Even the best web hosting providers have issues occasionally and itâs likely something came up if youâre seeing this error. One of two things happens: either your database has met its quota and has been shut down by the web host or your web hosting server is down.
In either event, contact your web hostâs support and see if there are any known issues. In the event your database has been shut down, the web host will likely restore temporary access for you to do some house cleaning.
Another likely scenario is that your wp-config.php file has incorrect information. Log in to your FTP client and find the file named âwp-config.php.â It should be located in your âpublic_htmlâ root directory.
Open up the file and ensure the following is correct:
- Database name
- Database username
- Database password
- Database host
You can find this information inside of your web hostâs cPanel. For providers that make this information easily accessible, check out our best web hosting with cPanel. Save the file with the correct information and you should be good to go.
Itâs unlikely but possible that your website has been hacked if neither of these two fixes work. To ensure it has been compromised, search your domain on Sucuri SiteCheck. If your site has been hacked, there are a few things you can do.
First is to contact your web hosting provider. It may provide a cleaning service, yes, but you want to give them a heads-up in the event the server is compromised. After doing so, go back to your site and try and reduce as much damage as possible.
That means locking out all currently logged in users and forcing a password reset. There are a couple of plugins that help you do this:
After locking everything down, the best you can do is snoop around. Try to find new plugins or recent changes to the CSS of your site. You can also look through the data of your site through your web hostâs file manager to see if anything looks strange.
Unfortunately, thereâs no single answer for cleaning a hacked site. Itâs often a lot of trial and error and asking the community for answers. Sucuri has a troubleshooting guide for a hacked site that we recommend you go through before paying for a cleaning service.
Once youâve found the attack and cleaned your site, be sure to change your passwords again. This is the single largest issue for repeat attacks on a website. After everything is fresh, create a backup of your site and consider running forensics with a tool like Splunk to patch any vulnerability in your system.
Last in line for our list of common WordPress errors is actually a pretty simple one. After updating WordPress, you may see âbriefly unavailable for scheduled maintenance. Check back in a minute.â The first step is to, well, listen to the warning. Wait a few minutes and check back to see if your website is back to normal.
If it isnât, then WordPress forgot to remove all installation files after updating. When WordPress updates, it installs a .maintenance file on your site. If this error persists, then it means the file hasnât been removed.
All you need to do is log in to your site via an FTP program and remove the .maintenance file. It should be located right in the root directory.
That file is solely responsible for displaying this error message. While itâs highly unlikely youâll ever see this error outside of a WordPress update, stranger things have happened. Any time you see it, make sure to check your root directory for the file.
We hope this intermediate guide to using WordPress helped you along your journey with the CMS. In our next guide, weâll look at topics like plugin and theme development as well as some advanced optimization options to trim a bit of your loading time.
If you have some more basic questions, then our beginnerâs guide (which is linked at the top of this article) is probably best for you. We give you the basics of installing and setting up WordPress so you have a solid foundation to continue learning about that platform.
For any particular WordPress questions, be sure to let us know them in the comments below. As always, thanks for reading.
Site Search 360 Reports