Một số hằng define hay dùng trong wordpress: đây là bài viết tổng hợp các define hay dùng trong file wp-config.php mục đích để copy cho nhanh chóng thôi nha ae
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
//Bật tắt debug define( 'WP_DEBUG', true ); //Ghi debug vào file debug define( 'WP_DEBUG_LOG', true ); //Hiển thị các lỗi php trong wordpress define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 ); //Hiển thị lỗi js trong wordpress define( 'SCRIPT_DEBUG', true ); //tăt update tự động define( 'WP_AUTO_UPDATE_CORE', false); //Tắt hỏi ftp khi cài plugin define('FS_METHOD', 'direct'); //Đường dẫn website define('WP_HOME','http://localhost/abc'); define('WP_SITEURL','http://localhost/abc'); //tắt crontab define('DISABLE_WP_CRON', true); //Không cho cài plugin và edit theme điều này hứu dụng khi đang bàn giao dự án chống copy dự án define( 'DISALLOW_FILE_EDIT', true ); define('DISALLOW_FILE_MODS',true); //Cho phép upload các file khác như pdf word... define ( 'ALLOW_UNFILTERED_UPLOADS', true); //khắc phục lỗi Fatal error: Allowed memory size of define( 'WP_MEMORY_LIMIT', '1024M' ); |
Mọi sự sao chép xin ghi rõ nguồn là fcwordpress.net
Chuyên trang về wordpress: hướng dẫn thiết kế theme, plugin, thủ thuật wordpress