Can’t update WordPress, need to reboot the VPS

PHP’s opcache module causes this kind of behaviour. Disable this module by editing the file at /etc/php5/mods-available/opcache.ini and placing a semicolon like this. ;zend_extension=opcache.so And restart PHP5-FPM/web server service. If you are not comfortable editing these files add these lines to the top of your child theme’s functions.php file. if ( is_admin() ): ini_set( “opcache.enable”, … Read more

WordPress load-scripts.php encoding issue

Can you provide the request header you get in your browser? It should follow this form: File: load-scripts.php 56: header(“Etag: $wp_version”); 57: header(‘Content-Type: application/javascript; charset=UTF-8’); 58: header(‘Expires: ‘ . gmdate( “D, d M Y H:i:s”, time() + $expires_offset ) . ‘ GMT’); 59: header(“Cache-Control: public, max-age=$expires_offset”); The request header is OK. I can confirm I … Read more

How can I prevent a plugin from searching for updates?

It is quite simple. All you have to do is add some code in a Custom Functions plugin. Lets say you want to block the “Hello Dolly” plugin (comes prepacked with WordPress) from updating. In your “My Functions Plugin”, mycustomfunctions.php (you can use any name really) you place the following: /* Disable a plugin from … Read more

Show last time WordPress site was updated / modified

This is a very simple query of the $wpdb->posts table. $last_update = $wpdb->get_var(” SELECT post_date FROM {$wpdb->posts} WHERE post_type IN(‘post’,’page’) AND post_status=”publish” ORDER BY post_date DESC LIMIT 1″ ); var_dump($last_update); You could do the same thing (similar) with … $args = array( ‘post_type’ => array(‘post’,’page’), ‘posts_per_page’ => 1, ); $last_updated = new WP_Query($args); var_dump($last_updated->post->post_date); … … Read more

How to notify my plugin users about new version releases?

You should integrate the ability to automatically update your plugin right through WordPress. There is a tutorial that gives you some help on this. Just my personal view, but: Please stay on the good side. Offer updates all the time, so your plugin stays up to date. I don´t want my site to get compromised … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)