• Resolved thananit

    (@thananit)


    Hello,

    I can’t increase a memory limit.

    I found a 500 error (short time) problem in my WP admin area, when I click a function or the page or save.
    If I click backward that it’s working.
    I think this problem effect from a memory limit.
    So I edit a memory limit of wp-config to 256M completely.
    /** Memory Limit */
    define(‘WP_MEMORY_LIMIT’, ‘256M’);
    define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ );

    But my site still has a memory limit=64m.
    My web hosting details;
    -PHP version 7
    -Memory limit 516M

    How to fix it?
    Please advise.

    Thank you,
    Thananit

Viewing 15 replies - 1 through 15 (of 16 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please contact your host for specifics on making this work on their system.

    Thread Starter thananit

    (@thananit)

    Hello,

    I contact my hosting before request your support.
    The hosting open a memory limit 512m and I try to edit a wp-cofig but not working.
    So I request your advised.
    I don’t understand why my WP can’t increase a memory limit.

    Thank you.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Have you also tried increasing memory in php.ini and .htaccess?

    https://docs.woocommerce.com/document/increasing-the-wordpress-memory-limit/

    Where do you see a memory limit of 64M?

    Thread Starter thananit

    (@thananit)

    I will try to increase memory in php.ini and .htaccess again.
    I checked my memory limit by WP-Memory-Usage plugin.
    And I compare it with phpinfo that my admin area show a memory limit=64m. but phpinfo show a memory limit of hosting=512m.
    I consult with my hosting but the cause of problem not effect from hosting.

    Thank you.

    Thread Starter thananit

    (@thananit)

    I try to do everything, increase memory in php.ini , wp-config, default-constants.php.
    But still not working.
    Can you help to find solution to solve this issue?

    Thank you,

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Do not touch default-constants.php.

    Please show your wp-config.php file (but XXXX out all the passwords and secret keys).

    Thread Starter thananit

    (@thananit)

    This is my wp-config.php;

    <?php
    /**
     * The base configuration for WordPress
     *
     * The wp-config.php creation script uses this file during the
     * installation. You don't have to use the web site, you can
     * copy this file to "wp-config.php" and fill in the values.
     *
     * This file contains the following configurations:
     *
     * * MySQL settings
     * * Secret keys
     * * Database table prefix
     * * ABSPATH
     *
     * @link https://codex.www.ads-software.com/Editing_wp-config.php
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'XXXX');
    
    /** MySQL database username */
    define('DB_USER', 'XXXX');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'XXXX');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8mb4');
    
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    
    /**#@+
     * Authentication Unique Keys and Salts.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.www.ads-software.com/secret-key/1.1/salt/ www.ads-software.com secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     *
     * @since 2.6.0
     */
    define('AUTH_KEY',         'XXXX');
    define('SECURE_AUTH_KEY',  'XXXX');
    define('LOGGED_IN_KEY',    'XXXX');
    define('NONCE_KEY',        'XXXX');
    define('AUTH_SALT',        'XXXX');
    define('SECURE_AUTH_SALT', 'XXXX');
    define('LOGGED_IN_SALT',   'XXXX');
    define('NONCE_SALT',       'XXXX');
    
    /**#@-*/
    
    /**
     * WordPress Database Table prefix.
     *
     * You can have multiple installations in one database if you give each
     * a unique prefix. Only numbers, letters, and underscores please!
     */
    $table_prefix  = 'wp_';
    
    /**
     * For developers: WordPress debugging mode.
     *
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
     *
     * For information on other constants that can be used for debugging,
     * visit the Codex.
     *
     * @link https://codex.www.ads-software.com/Debugging_in_WordPress
     */
    define('WP_DEBUG', false);
    define('WP_DEBUG_LOG', false);
    
    /*define( 'WPML_DISABLE_FILE_CACHE', true );*/
    
    /* That's all, stop editing! Happy blogging. */
    
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
    
    /** Memory Limit */
    define('WP_MEMORY_LIMIT', '256M');
    define( 'WP_MAX_MEMORY_LIMIT', '256M' );
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Move the memory related lines above the line that says “stop editing”.

    Thread Starter thananit

    (@thananit)

    I move it follow your suggestion but not working.
    The memory limit still has 64m.
    Please see my screenshots of wp-config.php https://ibb.co/m1fipk
    and my wp admin.
    https://ibb.co/jnxUUk

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    what’s putting that line at the bottom of your admin screen? It’s not part of wordpress core.

    Thread Starter thananit

    (@thananit)

    I did not put or modify anything.
    I just show a current of memory limit to you.
    I used a Server IP & Memory Usage Display plugin that it display a memory limit in footer of admin.

    Have you checked that there’s not .htaccess file in …/wp-admin/

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Also try a php.ini file in your site’s root.

    Thread Starter thananit

    (@thananit)

    I try it but still not working.

    Thread Starter thananit

    (@thananit)

    I had more wordpress websites on same hosting but not found the memory limit issue.
    And I try to replace WPv.4.8 again but not working, deactive all plugins and active one by one but not working too.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘can’t increase a memory limit- 500 error only admin area’ is closed to new replies.