WordPress Theme Avada Additional PHP and WP Parameters

Mindwatering Incorporated

Author: Tripp W Black

Created: 03/25/2019 at 08:56 PM

 

Category:
General Web Tips
Other

Issue:
Avada Theme status page shows issues with memory and get/post action.
- With PHP_PFM, the status screen will show Get working and Post failing. However, The calls to update WordPress engine to newest releases work regardless of the error.
- With Fast_CGI, the status screen will show Get sometimes working and Post failing. In addition, the first check server button works, but the second one always fails.


PHP.INI Custom Settings:
Avada has a lot of code. Increase PHP.ini memory and input variables beyond normal. It is especially important to increase the max execution time and the memory time. Also note, that the PHP.ini time-out and memory settings won't make it to the Avada plugin, you are giving WP this much in resources, but WP has limits within it's code. You also have to update wp-config.php, as well, further below.
e.g.
post_max_size = 64M
upload_max_filesize = 32M
max_input_vars = 2320
max_execution_time = 1200
max_input_time = 1000
memory_limit = 512M

This will give the server and WP plenty of room, but the memory will still be reported as 40 MB.

WP-Config.php Update:
Add the following to the wp-config.php. Make sure it is just below the DEGUG line. If you put it at the very bottom, the variables won't work. You also have to make sure they are uppercase, too. WP variables are case sensitive, meaning, they won't work unless in UPPERCASE.
$ sudo vi wp-config.php
...
*/
define('WP_DEBUG', false);
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');
set_time_limit(1200);
...
<esc> :wq
(to save)


WP_Remote_Get and WP_Remote_Post Errors on Avada.

Make sure your cURL nad PHP-CURL are up-to-date.
OS cURL and PHP-CURL:
$ sudo apt-get update
$ sudo apt-get upgrade curl curl-php

If you see, ... already newest version ..., then you should be good to go.
If you didn't, restart apache (or nginx).
$ sudo service apache2 restart

If you just migrated, the fix seems to be to open a ticket w/Avada. The fact that you open a ticket and give them a registration token, seems to unlock the server and the error goes away.
(Their version of anti-piracy??? )


WP Image Compression Prerequisites:
$ sudo apt-get install optipng gifsicle libjpeg-progs

Note: jpegtran is located w/in libjpeg-progs.



previous page