Cannot install WordPress plugin update – FTP Error

I ran into a problem when trying to update plugin in a fresh installed wordpress on a ClearOS Box! 😉

So I got it working by doing this and then ran this:

chown -R apache:apache /var/www
find /var/www/ -type d -exec chmod 755 {} \;
find /var/www/ -type f -exec chmod 644 {} \;

All working good now.

Optional : Add define(‘FSMETHOD’, ‘direct’); in wp-config.php
Not recommended for obvious Security issues!

OLD NOTES : as long as you have one (1) site apache is Ok, but when you have more sites you should never give them the same user, regardless if using the direct FS_METHOD in your wp-config or not. Why? If one site is hacked all others will be too.

We are in a Virtual Server Era now… will investigate this!

Enjoy!


Fatal error: Uncaught Error: Class "DOMDocument" not found in /home/nciaari7/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Model/FrontImage.php:67 Stack trace: #0 /home/nciaari7/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Model/FrontImage.php(41): ShortPixel\Model\FrontImage->loadImageDom() #1 /home/nciaari7/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Controller/Front/CDNController.php(568): ShortPixel\Model\FrontImage->__construct() #2 /home/nciaari7/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Controller/Front/CDNController.php(366): ShortPixel\Controller\Front\CDNController->extractImageMatches() #3 [internal function]: ShortPixel\Controller\Front\CDNController->processFront() #4 /home/nciaari7/public_html/wp-includes/functions.php(5493): ob_end_flush() #5 /home/nciaari7/public_html/wp-includes/class-wp-hook.php(341): wp_ob_end_flush_all() #6 /home/nciaari7/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters() #7 /home/nciaari7/public_html/wp-includes/plugin.php(522): WP_Hook->do_action() #8 /home/nciaari7/public_html/wp-includes/load.php(1308): do_action() #9 [internal function]: shutdown_action_hook() #10 {main} thrown in /home/nciaari7/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Model/FrontImage.php on line 67