Installing and Activating Wordpress plugins crashes Wordpress

plugin
trellis

#1

Hey there,

Installing or activating a plugin crashes wordpress on Chrome and Firefox. Activating the plugin the plugin on the ‘Add Plugins’ page immediately redirects to a ‘Unable to connect’ page.

I am using Trellis and Bedrock too and I’m not seeing anything in the error logs so a bit puzzled as to why this is happening.

I can activate the plugin on the standard plugins list page.

Any help would be much appreciated!


#2

Hey @orzelda - my guess is that this is unrelated to Sage and you might need to look elsewhere to figure it out. Have you tried activating a different theme (like Twenty Seventeen) and seeing if the problem still happens? If it still happens, Sage isn’t the culprit.


#3

The reason I popped it in here was I suspected because of Trellis and maybe something in the Vagrant file.

Actually this has nothing to do with Sage and still occurs on the pre-packaged WP themes.

I updated my question to reflect this.


#4

Gotcha. Thanks for updating the post. Unfortunately, I’m not familiar with Trellis–hopefully someone else will stop by who can help out on that front.


#5

When you say you’re not seeing anything in the error logs, are you looking at both of the following locations?

/srv/www/[sitename]/logs/
/var/log/

If you haven’t done this already, try setting WP_DEBUG and WP_DEBUG_LOG to true in /site/config/environments/development.php (assuming you’re having this issue in development):

<?php
/** Development */
define('SAVEQUERIES', true);
define('WP_DEBUG', true);

if( ! defined( 'WP_DEBUG_LOG' ) ) {
	define( 'WP_DEBUG_LOG', true );
}

With WP_DEBUG_LOG on, you should find a debug.log log file in /site/web/app/ which might provide more details.


#6

I am not seeing any of those log folders.

Thanks for the code to turn the debug stuff on. Trellis had this ON by default and nothing has appeared anywhere to log errors.

This is what I am getting when Activating the plugin.

There are no VPNs running and the firewall in the Mac OS System Preferences has been turned off.

Thanks for all your help!


#7

Does this happen with a specific plugin, or all plugins?


#8

Every plugin I install and then activate crashes the whole thing. It’s dead weird!

I can install it, go to the list plugins page on WP and then activate it there fine, but I am wondering if it pointing to something that might be erroneous in my local development setup.


#9

Actually, this gentleman had a similar problem, but I’ve been unable to fix my problem with his solution, which was to slightly amend the Vagrant file.


#10

Might want to start off by migrating away from that .dev TLD


#11

Thanks man! That was a good start! It no longer crashes but now I get the following

Which is definitely different!


#12

Now that you have a new error message, have you looked into it and all of the possible solutions? What have you tried so far?


#13

So the internet (and this article: https://imwz.io/updating-trellis/) has recommended that I do this to the main.yml in trellis/group_vars/all/main.yml:

php_max_execution_time: 300
php_max_input_vars: 1000
php_memory_limit: 256M
php_post_max_size: 128M

I added this in done a Vagrant Reload and restarted yarn but to no avail. I still think this is the right thing to do but not sure as to the location of where I should be adding the above instructions.


#14

Try vagrant reload --provision as a normal reload won’t update those php values.