Blank pages in WordPress pages

Blank pages can be seen in wordpress if the X-Frame-Options are set to deny. You can view the problem using browser dev tools and view the console log.

X-Frame-Options are used to indicate whether or not a browser should be allowed to render a page in a frame, iframe or object. Sites can use this to avoid clickjacking attacks.

Changing from DENY to SAMEORIGIN should work in most cases.

Nginx configuration

add_header X-Frame-Options SAMEORIGIN;

Using WordPress With LEMP


If you get the error ‘http error’ while uploading media:

1.Edit nginx.conf

nano /etc/nginx/nginx.conf

and add to the http block

client_max_body_size 100m;

2.Edit PHP config

nano /etc/php5/fpm/php.ini

and increase upload sizes

post_max_size = 100M
upload_max_filesize = 100M

Teamviewer and RDP

Using Teamviewer with RDP in Windows you may receive the following error when an RDP session is closed or minimised.

The screen cannot be captured at the moment. This is probably due to fast user switching or a disconnected/minimized remote desktop session

To get around this make sure Teamviewer is installed then:

1. Get the server ID from either Help > About Teamviewer or click on the bulb icon next to the ID
2. Set the unattended password in Extras > Options > Security.

Tested as of Teamviewer 11

Beanstalkd and Multiple Laravel Websites

If you have multiple websites on the same server using Beanstalkd for queues you can set unique queue tubes for each site to prevent jobs on the queue being triggered by the other sites.

In Laravel, edit the queue config file and change default to something unique like the website name.

'beanstalkd' => [
            'driver' => 'beanstalkd',
            'host'   => 'localhost',
            'queue'  => 'default',    
            'ttr'    => 60,