' . esc_html__( '🔔 PHP Memory Limit Notice', 'astra' ) . '
' . esc_html__( 'Your site is nearing its PHP memory limit, which may affect stability.', 'astra' ) . '
' . sprintf( esc_html__( 'We recommend increasing it to at least %s for best performance.', 'astra' ), '' . esc_html( $recommended_limit ) . '' ) . '
'; $message .= esc_html__( 'Learn how to increase your PHP memory', 'astra' ) . '
'; if ( $memory_percentage >= $this->warning_threshold ) { $description .= sprintf( __( 'Your site is using %1$s of %2$s available PHP memory (%3$s%%). Only %4$s remaining.', 'astra' ), '' . esc_html( $memory_usage_formatted ) . '', '' . esc_html( $memory_limit_formatted ) . '', '' . esc_html( $percentage_formatted ) . '', '' . esc_html( $memory_remaining_formatted ) . '' ); $description .= '
'; $description .= __( 'While your site is currently functioning, this high memory usage puts you at risk of crashes and errors, especially when using memory-intensive features like the customizer, page builders, or plugins.', 'astra' ); } else { $description .= sprintf( __( 'Your site is using %1$s of %2$s available PHP memory (%3$s%%). You have %4$s remaining.', 'astra' ), '' . esc_html( $memory_usage_formatted ) . '', '' . esc_html( $memory_limit_formatted ) . '', '' . esc_html( $percentage_formatted ) . '', '' . esc_html( $memory_remaining_formatted ) . '' ); $description .= '
'; $description .= __( 'Your memory usage is within acceptable limits. The Astra theme and your plugins have sufficient memory to operate properly.', 'astra' ); } $description .= '
'; $description .= __( 'About PHP Memory: PHP memory limit determines how much memory your website can use. Themes, plugins, and WordPress core all consume memory. When the limit is reached, your site may display errors or stop working.', 'astra' ); $description .= '
define(\'WP_MEMORY_LIMIT\', \'' . esc_html( $recommended_limit ) . '\');
php_value memory_limit ' . esc_html( $recommended_limit ) . '
memory_limit = ' . esc_html( $recommended_limit ) . '
' . __( 'Recommended memory limits:', 'astra' ) . '
'; $actions .= sprintf( __( 'For detailed instructions, visit our documentation on increasing PHP memory limit.', 'astra' ), 'https://wpastra.com/docs/system-requirement-for-astra-theme/' ); $actions .= '
' . __( 'No action required. Your memory usage is within acceptable limits.', 'astra' ) . '
' . __( 'Continue monitoring your memory usage, especially when installing new plugins or themes.', 'astra' ) . '