The steps to install WordPress are pretty simple and no one can disagree with that. But with a little more time (and with the knowledge you will acquire here in this article) you can achieve a significant improvement in the safety and quality of your installation. Many new users in WordPress have some difficulty knowing what to do after installing the latest version of WordPress. Throughout several articles, we will provide you a step-by-step guide so you know what to do concretely right after installing the latest version of WordPress.
These changes will also make your website perform better and help you to generate positive results in several aspects. Let’s see below how.
Change the structure of the permanent links
By default the installation of WordPress the structure of Permanent Links come as:
http://example.com/?p=123
But this configuration does not benefit your site, neither for the navigation of your visitors nor even for the robots of search engines. To change this default URL structure go to Settings> Permanent Links. In this screen select the “Custom Structure” option and enter the code below:
/%category%/%postname%/
For this pattern to work properly follow the guidelines on how to properly organize Categories and Tags in WordPress.
Remove unnecessary meta-data from your WordPress website
The WordPress source code loads numerous meta tags that in most cases are not essential to the proper functioning of the site.
An example of this is the version information of your WordPress installation that is displayed as below:
<meta name="generator" content="WordPress 4.7.3" />
In addition to being a good security change as well, individuals interested in achieving security holes in your site will know your version of the platform they should concentrate on.
To completely remove information from your current version and other non-essential metadata from your WordPress, add this code below to the functions.php file found in your template folder.
remove_action ('wp_head', 'wp_generator'); remove_action ('wp_head', 'wlwmanifest_link'); remove_action ('wp_head', 'rsd_link');
Remove some functions tags
These functions, which are called in the Template Tags Codex, are widely used in templates, allowing you to display the information you insert in various places of the WordPress administrative area, including the name of your website and description.
But all these functions make requests to the database, and in this case, the less information has to be loaded, the better the final result is.
Here are some of these functions that can be removed:
- Get_header
- Get_sidebar
- Get_footer
- Bloginfo
The first step is to search the header.php file of your templates. At first, we will see many lines similar to these:
See in the example below many calls to the <? Php bloginfo (”)?> Function:
<link rel="shortcut icon" href="<?php bloginfo('template_url'); ?>/favicon.jpg" type="image/x-icon" /> <meta http-equiv="content-type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo('stylesheet_url'); ?>" /> <link rel="alternate" type="application/rss+xml" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="application/rss+xml" href="<?php bloginfo('comments_rss2_url'); ?>" />
Substituting this code with the suggested changes below will be to decrease the database requests successfully:
<link rel="shortcut icon" href="http://example.com/wp-content/themes/YOURTEMPLATE/favicon.jpg" type="image/x-icon" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" media="screen" href="http://example.com/wp-content/themes/ YOURTEMPLATE /style.css" /> <link rel="alternate" type="application/rss+xml" href="http://example.com/feed" /> <link rel="alternate" type="application/rss+xml" href="http://example.com/comments/feed" />
Understand that the information contained within the function can be replaced by the information you know, according to the examples above, perform this procedure also in other files in your template, especially index.php, single.php, and footer.php.
Swap the media files folders
With this simple swap, you will tell browsers that the images uploaded to your site are stored on a different domain, which will allow these browsers to load parallel downloads and thus greatly improve the loading time of your pages.
Check how you can create a subdomain on your website, for example by using the name “images”, which will focus as follows:
http://www.images.subdomain.com
After you have the domain available, install one of the following plug-ins that facilitates this folder change process: the WP Original Media Path or the Upload URL and Path Enabler.
I’ll bring more tips in the next part of this knowledge base post. Only make changes to new installations, and tell what you think of the results you have obtained. If you know other interesting strategies, share with us.