Tag Archives: ajax

5 ways for Creating Better, Faster and More Optimized WordPress Websites

Creating better faster and more optimized wordpress websites

There are always new updates in WordPress, so that every developer should learn the latest optimization practices.  But, mostly seasoned developers focus on what they are good at. Then, neglect or don’t have time to learn the latest optimization practices. If you happen to be one among those kinds of web developers, you need to read the following tips. This article can help you create better, faster and more optimized WordPress sites.

  1. Switching Hosts Isn’t Always a Quick Fix

If you think that switching hosts will automatically fix certain problems, you may need to reconsider your opinion. In fact, you still experience some code issues or compatibility problems with specific plugins even though you have changed your host. A managed host will provide as much assistance as they can, but won’t debug an issue with a bad plugin or code for you. Therefore, you need a WordPress developer to dig into it and make a determination as to what the issue is. In fact, to solve these problems, many hosts provide third-party partners and developers.

  1. Don’t Try Editing Your Code

To avoid WordPress sites go down, you need to make sure that no one is editing a PHP file directly from the appearance editor in the dashboard. But, how? You can use the following code in your wp-config.php file, removing the edit_themes, edit_plugins, and edit_files capabilities for all users. This method will prevent users to hack away at the code and break the site.

define(‘DISALLOW_FILE_EDIT’, true);

Take this process one step further to update themes or install plugins and remove the functionality for clients to update. Place the following code in your wp-config.php file to restrict these capabilities.

define(‘DISALLOW_FILE_MODS’, true);

  1. Don’t Cut Corners on Your Themes and Plugins

WordPress might be the foundation of your site, but the themes and plugins are also important elements. Therefore, you need to choose your plugins carefully. Do a little research and look for its ratings and reviews beforehand.

Recent research even shows that nearly 50% of the plugins in the repository haven’t been updated in over 2 years. This makes these themes and plugins are easy to get infected with malware. Another thing to be on the lookout for is a bundled plugin that should be updated. This surely will cause a huge problem for WordPress users who buy things via online marketplace. On the other hand, this method will open a wide chance for hackers and site owners are extremely vulnerable.

  1. Watch Your Admin AJAX Calls

Inspect any plugins that may utilize AJAX, for instance, the WordPress Heartbeat API uses /wp-admin/admin-ajax.php to run AJAX calls from the web-browser. Mostly these kind of files occurs during  traffic spikes, CPU load, and can bring your site to a crawl.

If you find there are 3rd party plugins that utilize admin-ajax.php, make sure that everything runs in the correct way. Besides, you can figure out what plugins might be causing it by looking at the HTTP POST request action and quickly determine, based on its name. However, AJAX does load after the page loads.  So, this is not always a bad thing to see this in a speed test.

  1. Ensure PHP 7/HHVM Compatibility Before Jumping on Board

Nothing can beat PHP7 and HHVM when it comes to boosting WordPress performance. But, before you are tempted to use these programs, you need to make sure that your site is compatible with the program. This means before you are upgrading from PHP 5.6 to 7, you need to test all functionalities of your WordPress site in a staging environment or locally to ensure there aren’t any compatibility issues.

Ajax, a Technique for Better Web Applications


Have you ever used AJAX? Many web developers and app developers who like to make their website run faster and efficient will choose AJAX as their solutions. AJAX is actually a technique that has been applied in many popular social media which aims for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS, and Java Script. It works by retrieving data only in part that you need to change instead of reload the whole page. AJAX is an acronym that stands for Asynchronous JavaScript and XML. So far, AJAX is the most workable Rich Internet Application (RIA) technology. But at the same time, AJAX has browser incompatibility and it is supported by JavaScript, which is difficult to maintain and debug.

Along with Document Object Model and JavaScript for dynamic content display, Ajax uses XHTML for content and CSS for presentation. In conventional web applications transmit information to and from the server done through synchronous requests. AJAX is usually required to fill out a form, hit submit, and get to a new page directed with new information from the server while with AJAX, JavaScript will make a request to the server, interpret the results, and update the current screen once you hit the submit. In this sense, the user will never discover that anything was even transmitted to the server which causes better user experience compare to the conventional method.

Moreover, by using AJAX, a user can continue to use the application while the client program requests information from the server in the background. Besides, AJAX is also a more intuitive and natural user interaction, for example you may not require any clicking a mouse movement is a sufficient event trigger.

AJAX also standardizes to accomplish the following standards:

  • Browser-based presentation using TML and Cascading style sheets (CSS).
  • JavaScript to make everything happen.
  • Behind-the-scenes data fetches using XMLHttpRequest objects in the browser.
  • Data is stored in XML format and fetched from the server.