New to WordPress? Well, you are not alone.
Every online blogger and smart thinker who want to have online presence have to start blog some day. This is the WordPress optimization guide
for all.
First thing first:
Here are the steps to start your first blog.
Also you could setup your WordPress site locally on your Mac or Windows using MAMP. These steps may hardly take couple of hours. It should be super fast.
Now let’s get started on optimization tasks:
You need to tune your WordPress site. Tweaking
your newly created WordPress site for better security
and speed
may take days. In this tutorial we will go over list of things you should perform after setting up WordPress for first time 🙂
I’ve personally moved and installed blogs quite a few times. We have been providing Full WebSite Design Service for quite a some time now, more than 8 years. During this 8 years we have set up WordPress for more than thousand times.
This tutorial contains most tricks we apply after each WordPress installation.
Double check!!
Based on your custom requirements, you may need some more tuning but below applies to all basic WordPress setups.
We will cover all below topics here:
- Update Permalinks
- Change Media Settings
- Change date and time settings
- Clean up WordPress header section
- Stop all unnecessary Cron Jobs
- Protect your cPanel wp-content/ directory
- Change default WordPress username
- Hide login errors
- Stop saving all post revisions
- .hatches method to speedup site – Super blazing fast WordPress site
- Remove unnecessary emoji and embed scripts
- Tips on removing unnecessary themes and plugins
- Install Top essential WordPress Plugins
- Better user Google custom search than WordPress search
- Setup Google Feedburner, Analytics and Search Console right way
Below tutorial also works if you have below questions:
- Top 10 Most Important Things To Do After Installing WordPress
- Things You Should Do After Installing WordPress
- Essential Settings after installing WordPress
- What to do after installing wordpress
- Essentials to do after you install WordPress
- Next step after installing wordpress
- The Very First Steps After a Fresh WordPress Install
Let’s get started:
Step-1 – update Permalinks
- Go to WordPress Admin Panel
- Click on
Settings
->Permalinks
- Click
save changes
Permalink is a URL structure of your blog Posts. There are number of URL structures WordPress provides but I believe Post Name
is widely used around the globe.
Initial days people were saying about SEO advantages for Month and name
structure but I personally don’t believe that. Once you click Save Changes
, it will create .htaccess
file under your site’s root folder.
If you use FileZilla
to check file contents. Below a screenshot about .htaccess
file under Crunchify root directory
.
In our case WordPress puts below entries into .htaccess
file.
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
Step-2 Change Media Settings
If you want to load all of your images preferably from a sub-domain then try disabling Organize my uploads into month- and year-based folders checkbox.
By this your WordPress backups will be more manageable (the uploaded files can be backed up separately). If you are thinking of using different domain then it will allow parallel downloads in the browser. Better page loading time 🙂
- Go to Settings -> Media page
- Disable option for ==> Organize my uploads into month- and year-based folders
- Set
Width
andHeight
to 0 if you think your theme is not going to use those image sizes
If you need new featured image size then you could add it to theme’s functions.php
file. In my case I need 300x100 px
size for featured image on home page.
Below code will do the trick:
//* Add new featured image size add_image_size( 'grid-featured', 300, 100, TRUE );
I would also suggest to add compression on uploaded image
, which may reduce your media file size significantly which intern speed up your site. Here is detailed tutorial: WP Smush Or EWWW Image Optimizer?
Step-3
Go to Settings
-> General
page and change your timezone. Default timezone may not be right.
Step-4
Clean up WordPress header. Put below into your theme’s function.php
file to remove unnecessary headers being added to site header.
Follow detailed tutorial on how to cleanup WordPress Header Section?
Step-5
Block unnecessary cron jobs
. In my case I use Disqus and it performs unnecessary cron comment sync-job tasks. Add below to your site to prevent unnecessary cron jobs
.
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{QUERY_STRING} !="" RewriteCond %{QUERY_STRING} !^s=.* RewriteCond %{QUERY_STRING} !^cx=.* RewriteCond %{QUERY_STRING} !^q=.* RewriteCond %{QUERY_STRING} !^url=.* RewriteCond %{QUERY_STRING} !^p=.* RewriteCond %{QUERY_STRING} !^ver=.* RewriteCond %{REQUEST_URI} !^/wp-admin.* RewriteRule ^(.*)$ /$1? [R=301,L] </IfModule>
This is what we have placed currently at our end. If you want to learn more than follow this detailed tutorial which I wrote couple of weeks back.
Step-6
Add below line to .htaccess file. Must rule
for securing your site contents.
Options All -Indexes
This will prevent people from browsing your site’s folder. Try visiting your site’s upload folder.
i.e. http://<your_blog>/wp-content/uploads/
and make sure none of the files are visible in browser.
Step-7
Change default admin
username.
- Try to go to cPanel
- Open table wp_users
- Change username to your desire one. You need to change it to better and unpredictable username. Let’s not allow hackers to even guess username 🙂
Also, prevent all login errors
by putting below to theme’s functions.php
file.
function crunchify_prevent_login_error(){ return ''; } add_filter( 'login_errors', 'crunchify_prevent_login_error' );
Step-8
Add below to wp-config.php
file. You absolutely don’t need to save more revisions history. It will simply increase load on your site.
define( 'WP_POST_REVISIONS', 3); // only allow 3 post revisions define( 'AUTOSAVE_INTERVAL', 120 ); // set default save interval to 2 mins
Do you want to perform complete WordPress Database cleanup? This is must tutorial and you should follow each steps usually every 6 months.
Step-9
If you are using default WordPress comment then add below to functions.php
file avoid displaying .html content.
Also, better stop loading admin bar.
add_filter( 'pre_comment_content', 'esc_html' ); // remove html from comment add_filter('show_admin_bar', '__return_false'); // disable admin bar
Step-10 Speed optimization goal
Follow each tutorials carefully. It will speed up your site speed significantly.
- .htaccess method: Speed up WordPress Leveraging Browser Caching via .htaccess
- other tricks: Top 5 Useful Tricks on How to Speed Up WordPress
See what others are saying 🙂
Step-11
- Stop loading
emoji scripts
. Please follow tutorial how to stop loading WP Emoji which I wrote couple of days back. - Disable Auto
Embed Script
for WordPress 4.4. Please follow tutorial on how to Disable Auto Embed Script, which I wrote couple of days back.
Step-12
Remove unnecessary themes
and Plugins. It’s absolutely not required to keep old themes and plugins which are not in use. Simply delete from your admin panel.
Step-13
Add essential WordPress Plugins. Please make sure you don’t add any junk plugins on site. It may fill up your WordPress database with unnecessary data and may slow down your site.
Step-14
Add your own Google’s custom search and don’t use WordPress’s default search option. I mean it – don’t ignore this. You need this in order for users to get best search result from your site.
Step-15
Setup below 3 Google Services which I use on daily basis:
This is a handy comprehensive list for all WordPress blogger to go over. I usually revisit this post every 3 months and update if required. Let me know if you would like to add your favorite steps after installing WordPress for first time.