XTRA https://xtratheme.com WordPress & WooCommerce Theme + WP RTL Tue, 09 Feb 2021 08:55:26 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.2 How to speed up WordPress website https://xtratheme.com/blog/how-to-speed-up-wordpress-website/ https://xtratheme.com/blog/how-to-speed-up-wordpress-website/#respond Thu, 27 Jun 2024 20:38:32 +0000 https://xtratheme.com/?p=22551 Read More]]> One of the important factors in any websites is the speed and loading time, There are hundreds articles about speed up website which you can find over the internet by a simple search in google, but most of them aren’t complete and may breaks your website design due to recommending bad minifying and caching plugins. In this article we decided to explain you how you can speed up your website step by step including some free plugins.

Why you should speed up your website?

  • Search engines like Google likes fast websites and faster websites have higher rank thank slow loading websites in search results.
  • Studies have shown that website loading speed of more than 2 seconds usually results in about 47 percent of visitors bouncing off the website. So it’s important to have faster loading speed.
  • Online buyers will left your website if they wait more than a few seconds for your site to load because usually buyers are impatient. So loading speed is important for online stores.

How to test the loading time of your website?

There are dozens of free and paid online websites on the internet that provides website speed test tools. Keep in mind testing website speed is different page to page and you need to test all of your important website pages but home page is important than others. Here some of good online websites for speed test:

Testing website home page is recommended to see how many requests your site have, page size, server caching, assets, number of images and fonts, inline or external scripts, etc.

Page speed score is the average of some factors which is recommendation section you can see. Any part have its description and its important for your site to get full score for each parts.

Important factors to get best page speed score

  • Choose a better web hosting provider
  • Use a lightweight WordPress theme
  • Use less images and Reduce image sizes
  • Use lazy load feature for images
  • Minify JS and CSS files and HTML output
  • Use advanced caching system with a caching plugin
  • Use a good CDN server
  • Enable GZIP compression on your server
  • Cleanup WordPress database
  • Install less plugins or Deactivate or uninstall unused plugins
  • Disable PingBacks and Trackbacks

Web hosting provider

Choosing the right hosting for your WordPress website is very important. Your website’s health will rely on the hosting provider your use.. According to Google, the optimal server response time is 200 ms. Anything slower and sites will start feeling sluggish. So be careful before buying any web hosting and check all the factors such as Uptime, Speed, Security and Customer support.

Lightweight WordPress Theme

XTRA WordPress theme is one of the best lightweight themes on the market with over 80 demos, most of the CSS styles dynamically generated and it means there is no high default CSS styles in the files. You can test all of XTRA demos via GTMetrix to see the performance scores.

Lazyload and images size

It’s important to use less images on your website to reduce page size and load time, but if you want to use more images in one page, lazyload feature will required for your website for reduce server requests in first load. Lazyload will help your website to stop loading images on first load and by scrolling page each image in the viewport will start loading one by one. Also using image optimizer plugins such as EWWW Image Optimizer will really help your site to load faster.

Minify JS and CSS files

Minifying CSS and JS files means compressing all files into one file for faster load. Now days themes and websites are not optimized by default and they are loading dozens CSS and JS files. If you check your site via GTMetrix you will see there are a lot of requests to your server. Usually CSS and JS files are not minified for faster load in themes, So its required for any website owner to use minifying plugins. Our recommendation for minifying your site assets is Autoptimize because it allow you to minify CSS, JS and even HTML output of your website. All of online website testers will check your website assets, so if you use minifying plugins you will get better scores.

Use caching plugins

What’s cache plugin? Caching is the process of storing frequently accessed data as HTML file temporarily in a cache. Caching is a complex technology that does one simple thing really well: it makes your website really fast. And speed is critical to the success of your site because people don’t like waiting around for web pages to load. We recommend you to use WP Super Cache to speed up your website.

Use a CDN

A content delivery network (CDN) refers to a geographically distributed group of servers which work together to provide fast delivery of Internet content. If you want to see benefits of CDN, Please see this Cloudflare article.

Enable GZIP compression on your server

Gzip is a method of compressing files (making them smaller) for faster network transfers. Enabling gzip compression is a standard practice. If you are not using it for some reason, your webpages are likely slower than your competitors.

Enable compression via .htaccess:

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

Save the .htaccess file and then refresh your webpage. Or enable compression on Apache webservers:

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

Or enable compression on NGINX webservers:

gzip on;
gzip_comp_level 2;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

# Disable for IE < 6 because there are some known problems
gzip_disable "MSIE [1-6].(?!.*SV1)";

# Add a vary header for downstream proxies to avoid sending cached gzipped files to IE6
gzip_vary on;

Finally after adding enabling Gzip compression on your site, test again your site with GTMetrix.

Cleanup WordPress database

Deleting spam comments, posts revisions, unused tags and categories, fake users and old drafts from your database will help to speed up your site. Deleting unwanted data from your database will keep its size to a minimum and also helps in reducing the size of your backups. All of this will reduce the size of your databases and web files, and thus speed up WordPress. You can install and use Advanced Database Cleaner to do it.

Deactivate or uninstall unwanted plugins

If you are one of those people who like to install a lot of plugins, there is bad news for you, most of plugins will load extra CSS and JS files and its bad for your website because they will decrease your website loading time and speed and also performance. Also when you use lots of plugins, your website security is more at risk. So, check all of you plugins and as possible delete unwanted plugins.

Disable PingBacks and Trackbacks

Pingbacks and trackbacks are link notifications that enable you to keep track of when other sites link to your content. When these notifications are enabled, they appear in the comments section of your posts. To enable or disable pingbacks and trackbacks, follow these steps:

  • Log in to WordPress as the administrator.
  • In the left pane of the dashboard, click Settings, and then click Discussion.
  • In the Default article settings section
  • To enable pingbacks and trackbacks, select the Allow link notifications from other blogs (pingbacks and trackbacks) check box.
  • To disable pingbacks and trackbacks, clear the Allow link notifications from other blogs (pingbacks and trackbacks) check box.
  • Click Save Changes

Conclusion

Speed up is important factor to have more and more visitors, Speed up website will make search engines loves your website and you will get more rank in search results. Your server also will get less requests and less resources usage. If you think we can add anything helpful to this article please contact us, We will glad to provide more information about speed up website to all website owners.

]]>
https://xtratheme.com/blog/how-to-speed-up-wordpress-website/feed/ 0
Easy way to stop spam comments without plugin https://xtratheme.com/blog/easy-way-to-stop-spam-comments-without-plugin/ https://xtratheme.com/blog/easy-way-to-stop-spam-comments-without-plugin/#respond Wed, 26 Jun 2024 19:27:19 +0000 https://xtratheme.com/?p=22667 Read More]]> If you are website owner, you probably have encountered spam comments, They are really annoying and surely you have looking for a way to get rid of spam comments.

If you search about preventing spam comments in search engines like Google, surely you will find some free and paid plugins which some of them works and some of them not. But usually website owners don’t like to use plugin for this type of problems due to performance of their website and also security risk.

So what’s the easy solution for preventing spam comments? We have a quick solution here, by adding small PHP codes to your theme or child theme functions.php file you will prevent all spam comments on your website.

Replace website field in comments form with security field

Just copy and paste following code into your theme or child theme functions.php file and save it.

// Add security field to comments.
function xtra_add_comment_field( $fields ) {

	if ( isset( $fields['url'] ) ) {

		$num_a = rand( 1, 10 );
		$num_b = rand( 1, 10 );

		$fields['url'] = '<p class="comment-form-url"><label for="url">' . $num_a . ' + ' . $num_b . ' = ?</label><input id="url" name="url" type="text" value="" size="30" maxlength="200" /><input name="security" type="hidden" value="' . md5( $num_a + $num_b ) . '" /></p>';

	}

	return $fields;
}
add_filter( 'comment_form_default_fields', 'xtra_add_comment_field' );

// Check security field for comments.
function xtra_verify_comment_field( $commentdata ) {

	if ( ! empty( $_POST['url'] ) && ! empty( $_POST['security'] ) ) {

		if ( md5( $_POST['url'] ) !== $_POST['security'] ) {
			wp_die( 'Error: Security answer is wrong' );
		}

		$commentdata['comment_author_url'] = '';

	} else {
		wp_die( 'Error: Security answer is wrong' );
	}

	return $commentdata;
}
add_filter( 'preprocess_comment', 'xtra_verify_comment_field' );

Save file and refresh your post page then check your comments form. Or if you want to add security question field under other fields, try bellow function codes.

Add security field in comments form under website field

But If you want to keep your comments form website field and want to add one extra security field bellow it, you can use following codes:

// Add security field to comments.
function xtra_add_comment_fields( $fields ) {

	if ( isset( $fields['question'] ) ) {

		$num_a = rand( 1, 10 );
		$num_b = rand( 1, 10 );

		$fields['question'] = '<p class="comment-form-question"><label for="question">' . $num_a . ' + ' . $num_b . ' = ?</label><input id="question" name="question" type="text" value="" size="30" maxlength="200" /><input name="security" type="hidden" value="' . md5( $num_a + $num_b ) . '" /></p>';

	}

	return $fields;
}
add_filter( 'comment_form_default_fields', 'xtra_add_comment_fields' );

// Check security field for comments.
function xtra_verify_comment_field( $commentdata ) {

	if ( ! empty( $_POST['question'] ) && ! empty( $_POST['security'] ) ) {

		if ( md5( $_POST['question'] ) !== $_POST['security'] ) {
			wp_die( 'Error: Security answer is wrong' );
		}
		$commentdata['comment_author_url'] = '';
		
	} else {
		wp_die( 'Error: Security answer is wrong' );
	}

	return $commentdata;
}
add_filter( 'preprocess_comment', 'xtra_verify_comment_field' );
]]>
https://xtratheme.com/blog/easy-way-to-stop-spam-comments-without-plugin/feed/ 0
WP Optimize – Make your site fast and efficient https://xtratheme.com/blog/wp-optimize-make-your-site-fast-and-efficient/ https://xtratheme.com/blog/wp-optimize-make-your-site-fast-and-efficient/#respond Sun, 16 Jun 2024 08:53:45 +0000 https://xtratheme.com/?p=23498 Read More]]> Website speed is absolutely important for both website owners and website visitors, By a simple search you can find a lot of free and paid plugins for caching, compressing, minifying, etc. for improving website speed. But all will recommend you install and use multiple plugins to get all features, Fortunately WP-Optimize plugin has solved this problem and it has all the important features in one plugin. WP-Optimize is a revolutionary in website optimizations.

  • Clean Database
  • Cache pages and posts
  • Compress HTML, CSS and JS files
  • Compress Images size

Cleans the Database

Actually your WordPress database stores everything that you need for your WP website and also many things that you don’t such as old post revisions. WP-Optimize clears out all of unnecessary data such as unused data and revisions, cleans up your tables and even retrieves space lost to data fragmentation.

  • Removes unnecessary trashed, unapproved and spam comments
  • Removes stale data, ping-backs, trackbacks and expired transients
  • Removes post revisions and unused tags
  • De-fragment MySQL tables with a button press
  • Detailed control of which optimizations you wish to carry out
  • Carries out automatic weekly (or otherwise) clean-ups
  • Show database statistics and potential savings

Compress Images

One of the biggest reasons for the slowing your website speed is uploading very large images with high size, Good news is WP-Optimize have compressing images size feature that will allow you to compress all images without losing their quality. It enables you to compress PNG, JPG, GIF, BMP and TIF pictures up to 5mb and it’s packed with other useful features.

  • Bulk compression
  • Intelligent, multi-pass lossy compression algorithm
  • Restore Originals safe function
  • Auto compress function while uploading
  • EXIF Data-Keeping
  • Compress Big Files function

Caches Pages

Most importantly, it will significantly increase the loading speed of your site. It also reduces the number of requests to the server. By converting all website pages to static HTML files, your server do not need generate pages dynamically anymore for hours or days. Caching involves keeping dynamic data in a temporary storage area so that it can be retrieved in an instant. Caching is a sure-fire way to ensure that web pages load at lightning-fast speed.

  • Cache preloading
  • Gzip compression
  • Device Specific cache
  • Advanced cache exclusion rules
  • Browser Cache

WP-Optimize plugin brings the best cache and optimization technology together in a single seamless plugin to make your WordPress website faster, lean and efficient.

Minify CSS and JS files

WP-Optimize plugin has the more advanced minification feature. Combining and minifying your site’s assets will reduce the number of requests to your server and reduce their size. Together with caching and Gzip compression, this will improve the performance and time to first contentful paint.

If you purchase also premium version of WP-Optimize plugin, you will get this extra features:

  • Multisite Support
  • Flexibility and Control
  • Deleting unused and unwanted images
  • Sophisticated Scheduling
  • Scheduling automatic optimization
  • Seamless Graphical User Interface
  • WP-CLI support
  • Lazy Loading
  • Optimization Preview
]]>
https://xtratheme.com/blog/wp-optimize-make-your-site-fast-and-efficient/feed/ 0
Best free WordPress Security plugins to secure your website https://xtratheme.com/blog/best-free-wordpress-security-plugins-to-secure-your-website/ https://xtratheme.com/blog/best-free-wordpress-security-plugins-to-secure-your-website/#respond Wed, 12 Jun 2024 14:20:41 +0000 https://xtratheme.com/?p=23231 Read More]]> WordPress system is a very secure CMS and when developers find a vulnerability or bug, they will push an update to patch it in the new updates. Usually, WP powered websites are hacked through third party free or premium Plugins and themes. There are other factors too that can be used to hack WP websites such as WP Hosting server vulnerabilities, File permissions, WP database security, FTP vulnerabilities, Weak passwords, Your computer security and etc.

We have investigated and listed some good security plugins, Here is a list of the best WP Security Plugins that you can use and add an extra layer of security to your WordPress website and make sure your website is full safe.

Wordfence Security Firewall & Malware Scanner

Wordfence WordPress plugin includes an endpoint firewall and malware scanner for your site that were built from the ground up to protect your WordPress website. Wordfence Threat Defense Feed arms Wordfence with the newest firewall rules, malware signatures and malicious IP addresses it needs to keep your WordPress website safe. Rounded Wordfence by 2FA and a suite of additional features, Wordfence is the most comprehensive WordPress security solution available in the world. Some Wordfence WP plugin features:

  • WordPress Website Firewall
  • IP Blocking Features
  • Security Scanning
  • Login Security
  • Monitoring Features
  • Network Multi Site Security
  • Major Theme and Plugins Supported
  • IPv6 fully Compatible

iThemes Security – formerly Better WP Security

iThemes WP security plugin from the known WordPress themes and plugins developer iThemes company. iThemes free WP security plugin is for WordPress gives the user more than 30+ ways to protect WordPress website. iThemes comes with one click installation and easy setup of the plugin, on the other hand, its advanced security options can be easily configured from the WP dashboard.

iThemes WordPress Security plugin protects WordPress websites via fixing common security vulnerabilities, bugs, helps users with strong login passwords, stop all attacks and more security features. There is a security checklist in the plugin WP dashboard for easier maintenance.

Sucuri Security – Auditing & Malware Scanner

Sucuri WordPress plugin is a globally recognized authority in all matters related to website security, with specialization in WordPress Security. The Sucuri Security WP plugin is free to all WordPress users. It offers its users a set of security features for their website.

  • Security Activity Auditing
  • File Integrity Monitoring
  • Remote Malware Scanning
  • IP Blacklist Monitoring
  • Effective Security Hardening
  • Post Hack Security Actions
  • Security Notifications
  • Website Firewall
]]>
https://xtratheme.com/blog/best-free-wordpress-security-plugins-to-secure-your-website/feed/ 0
Best Free WordPress Backup Plugins https://xtratheme.com/blog/best-wordpress-backup-plugins/ https://xtratheme.com/blog/best-wordpress-backup-plugins/#respond Tue, 04 Jun 2024 05:28:44 +0000 https://xtratheme.com/?p=24547 Read More]]> In today’s world, data is often the most valuable asset in a business, and any major data loss event can have devastating consequences, as evidenced by the myriad of high-profile ransomware attacks. It covers the whole world and affects various companies, business and organizations.

Your backup strategy must reflect IT needs, budget, and resources. Some backup strategies may seem only good on paper, but unless they align with your business, they may be more difficult than they are worth.

Backup methods:

  • Database backup: Some plugins allow you to only backup your database.
  • Complete backup: Some other plugins let you backup your entire website, including your database and all files.
  • Scheduled backup: This option you can schedule a backup to run automatically, giving you peace of mind.

Full Backup Strategy

Full backup is the simplest strategy to back up data. As the name implies, this includes a copy of all stored data. If you want to create a full backup at the end of each day, you will need at least 5 times the backup space due to the storage space. The high cost of storage space is the biggest disadvantage of full backup. Another important downside is the time it takes to back up. It doesn’t matter how many changes have been made to the latest backup. A full backup is always a copy of any saved file, even if it’s already backed up.

List bellow is the best WordPress Backup plugins (2020)

UpdraftPlus

One of the best and simplest plugin for backup and restoration WordPress website and database and most popular scheduled backup plugin. It’s easy to use and you can backup and restore your website with single clicks. Also it does a powerful documentation. Backup into the cloud directly to Dropbox, Google Drive, Amazon S3 (or compatible), UpdraftVault, Rackspace Cloud, FTP, DreamObjects, Openstack Swift, and email. The paid version also backs up to Microsoft OneDrive, Microsoft Azure, Google Cloud Storage, Backblaze B2, SFTP, SCP, and WebDAV. Some of features:

  • Incremental backups
  • Easily duplicates or migrates websites
  • Multisite network supports
  • Backs up non WP files and databases to multiple destinations
  • Storage destinations (e.g. OneDrive, BackBlaze) and multiple destinations
  • Database encryption
  • Advanced reporting
  • Supports WP-CLI

Download UpDrafts Plus here

VaultPress by JetPack

VaultPress plugins is one of the best plugins for backups. It’s real time backup and restoration plugin, also it have security scanning services. VaultPress designed and developed by Automatic team, the same company that operates millions of sites on WordPress.com and creators of WooCommerce plugin. This plugin is now powered by Jetpack and effortlessly backs up every post, page, comment, media file, revision, and dashboard setting on your site to our servers.

Download VaultPress here

BackWPup

BackWPup can backup and restore your whole WordPress website and also can backup your wp-content folder and push it on external servers and services such as DropBox, FTP, S3, etc. With a simple .zip file of your backup you can simply restore your installation on the same or new site. Some features:

  • Database Backup (Require mysqli)
  • WordPress XML Export
  • Generate a file with installed plugins
  • Optimize, Check and repair Database
  • Files and folders backup
  • Backups in zip, tar, tar.gz format
  • Store backup to directory
  • Store backup to FTP, Dropbox, S3, Microsoft Azure
  • Store backup to RackSpaceCloud, SugarSync

Download BackWPup here

Conclusion

Your data backup strategy should reflect your recovery goals and your business needs. Don’t forget to consider the location of your backup. Having all the eggs in one basket is a disaster. Modern cloud backup solutions allow you to easily distribute your backup in different geographical areas without any overhead.

]]>
https://xtratheme.com/blog/best-wordpress-backup-plugins/feed/ 0