标签:配置 ext als org targe ace upload 修改 dir
因应用商店中的自带的wordpress版本太旧,有需要用到官网上下载的最新版的,就要考虑移植了。
网站根目录下,修改wp-config.php
f ( empty($upload_path) ) { $dir = WP_CONTENT_DIR . ‘/uploads’; } else { $dir = $upload_path; if ( ‘wp-content/uploads’ == $upload_path ) { $dir = WP_CONTENT_DIR . ‘/uploads’; } elseif ( 0 !== strpos($dir, ABSPATH) ) { // $dir is absolute, $upload_path is (maybe) relative to ABSPATH $dir = path_join( ABSPATH, $dir ); } } if ( !$url = get_option( ‘upload_url_path’ ) ) { if ( empty($upload_path) || ( ‘wp-content/uploads’ == $upload_path ) || ( $upload_path == $dir ) ) $url = WP_CONTENT_URL . ‘/uploads’; else $url = trailingslashit( $siteurl ) . $upload_path; } if ( defined(‘UPLOADS’) && !$main_override && ( !isset( $switched ) || $switched === false ) ) { $dir = ABSPATH . UPLOADS; $url = trailingslashit( $siteurl ) . UPLOADS; } if ( is_multisite() && !$main_override && ( !isset( $switched ) || $switched === false ) ) { if ( defined( ‘BLOGUPLOADDIR’ ) ) $dir = untrailingslashit(BLOGUPLOADDIR); $url = str_replace( UPLOADS, ‘files’, $url ); }
改为
更多移植攻略可参见:
http://www.xiumu.org/diary/wordpress-for-sae.shtml
标签:配置 ext als org targe ace upload 修改 dir
原文地址:http://www.cnblogs.com/wanghaokun/p/6104581.html