Categories
Blog Nginx server management Wordpress

5 ways to optimize Nginx for WordPress

WordPress is the single largest platform for website creation and web application delivery worldwide. Eventually, if the server is down it will affect your business widely. With the Nginx software or the web servers, there are ways to optimize WordPress websites.

As a part of our hourly server administration services, Our technical team support will assist our clients to speed up their websites, optimize Nginx for WordPress to make its load faster and lots more.

Optimize Nginx for WordPress

Depending on the powerful server the WordPress websites load quickly. Similarly, enabling faster DNS, optimizing the WordPress templates, content delivery network and lots more will also help.

Although, You can drive to many options to make your WordPress faster, for better WordPress performance let’s have a glance at optimizing the Nginx for WordPress.

Before proceeding with the optimization, have an apparent view of the WordPress website current states. Working with the current values leads to better than doing some blind tweaks.

 Let’s have a glance at that top teak in Nginx configuration.

  1. Enabling Keepalive

By enabling the keepalive in the web server will keep the connection open between the browser and the server even after completing the page request. For a further page, it’s better to keepalive connection rather than the new connection. As it helps in reducing the usage of server resources.

Additionally, serving multiple files using the same connection can reduce latency and allow WordPress pages to load faster.

Ensure to keepalive connection turn ON  on the server.

 Set Browser caching headers

In order to increase the web site speed try to enable the browser caching header in the Ngnix, in another word the cache is the place that used to activate the data to make access easy. whereas the static files are stored in the cache that makes WordPress load faster. we inform browsers to cache the pages.

 we recommend to our client as based on our experience Nginx server management will increase the time to load the page initially, while if you have recurring visitors on the WordPress website that will drastically reduce the loading time

Gzip content

By the Gzip content will compress the data to reduce the file size and make it easy to transfer the files. Is this one of WordPress speed optimization, by using the WordPress plugins wp super cache,w3 total cache and more, you can enable the compression. but, often these plugins come with a lot of data overhead and can increase the risk of conflicts. Thus, in all possible scenarios, we recommend to our clients to set up compression directly in the webserver configuration.

By default, Nginx comes with compression methods like Gzip. by using this default setting only a few will only compress certain file types like text/html. we use the nginx.com file to optimize Nginx for WordPress.

Again, if the website is on shared hosting, we enable gzip compression in the website’s Nginx config file.

Install and tweak PHP FPM

By enabling the PHP-FPM (PHP FastCgi Process Manager) will help in increasing the speed of the WordPress application. This method is for the Nginx server to serve the static files. whenever the user requests a PHP page the Nginx server will forward the request to the PHP for the further process on this own server. we isolate the PHP page processing to PHP-FPM, which again help to make the website faster.

During this setup, under our hourly server management administration configure PHP with options like –enable-fpm and –with-fpm . Further, we optimize the values at the file /opt/phpxx/etc/php-fpm.conf

Again, this involves further tweaking in each website’s virtual-host configuration too. to enhance the performance, the cache responses from FastCGI PHP applications.

When using FastCGI, we make use of the fastcgi_cache_key, fastcgi_cache_path, and fastcgi_cache_purge variables in the location block of each domain. various plugins available to configure the caching in order to help purge the cache automatically after modifying the post. 

Add Security Precautions

BY configuring the Nginx that will ensure to prevent unauthorized access to the WordPress files to reduce attack on your website.

In order to secure the WordPress website, our technical team support will use the location directive in Nginx config file. We tweak it to avoid users from executing scripts from the uploads directory, restrict WordPress Dashboard access to trusted IP addresses, deny access to wp-config.php, rate limit WordPress website logins and so on.

Conclusion

In brief, WordPress is the single largest platform for website creation and web application delivery worldwide, if your website loading slowing our technical team support will help you to make the website load faster. Contact us for more information.

Categories
Blog Linux macOS server management Windows

How to troubleshoot server down issues

Troubleshooting server down issues is never an easy task. Whether it might be a larger or small network, it’s necessary to take meticulous steps to get the server up.

Struck with server down issues, now you can take assistance from our technical team support to troubleshoot server issues under our server management plan.

Network issues that occur when all the server in a data center goes down. Its leads to unlucky instances. Follow the step to troubleshoot the issues.

How to troubleshoot server down issues

Initially, need to ensure whether it’s a false alert. For this, you need to connect the server via ping or telnet to any of the running port, check and ensure whether the server is down or not.

Run commands to check

ping server ip

telnet serverip port number

For example,

ping 186.65.23.15

telnet 186.65.23.15 22

The above command is preferred for all other operating systems i.e Linux, Mac, or Windows.

If the server response well with pings without any data loss, it means that everything working well without any issues. then it’s probably a false alert.

-
ping google.com -c10
PING google.com (74.125.129.100) 56(84) bytes of data.
10 packets transmitted, 10 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 326.477/326.477/326.477/0.000 ms
-

If the server is not responding to pink, then you need the assistance of hosting providers. you can also take our technical team support to sort out the issue on your behalf.

There can be so many reasons for the server being down.

  • High load in the server
  • Faulty equipment
  • High temperature in the DC room
  • Partition being full
  • No disk space in the server
  • Power connection cable

If the server is stuck, a reboot from DC is a better option.

If the server is running up, then it is necessary to know the reason behind the cause. In order to find the reason refer to the below logs location in the server.

For Linux:
/var/log/messages —
dmesg |grep less
/var/log/boot.log
/var/log/fsck
For Windows:
Start>>Run>>eventvwr

If the server is down due to high load (give to spam or number of incoming connections to HTTP), it is necessary to check the incoming connection and block them in the server.

If it is the case of server fsck check it requires time to fix the issue.

They are different reasons for the fsck check running.

  • The complete unmounting ability of the hard disk
  • Using a third-party utility to delete the extended partition
  • Problems with any filesystems
  • Power failure
  • Incomplete shut down
  • Hardware failure

The above causes result in file system operations being incomplete.

Below are the few sample logs we can find in the Linux logs.

Checking all file systems.

[/sbin/fsck.ext3 (1) — /] fsck.ext3 -a /dev/xvda1
/: clean, 56079/1310720 files, 1243508/2621440 blocks
[/sbin/fsck.ext3 (1) — /var/www/virtual] fsck.ext3 -a /dev/sdf
fsck.ext3: No such file or directory while trying to open /dev/sdf
/dev/sdf:

If the superblock could not able to read or describe the correct ext2 filesystem and if the device contains a valid ext2 filesystem (but not the swap or ufs) its means the superblock is corrupted.Its request to run e2fsck with an alternate superblock.

e2fsck -b 8193

 After the fsck check, the server will be fine without any issues.

Conclusion

In brief, Network issues that occur when all the server in a data center goes down. Its leads to unlucky instances. Follow the step to troubleshoot the issues. If you still stuck with the issue you can take our technical team support for further assistance.