首页 > 代码库 > WordPress For SAE 移植
WordPress For SAE 移植
因应用商店中的自带的wordpress版本太旧,有需要用到官网上下载的最新版的,就要考虑移植了。
第一步 配置文件
网站根目录下,修改wp-config.php
第二步 附件/图片无法上传修正 wordpress问题无法建立目录wp-content/uploads/2014/0
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 );}
改为
- $dir = ‘saestor://haokunblog/uploads’; //haokunblog是你的storage domain
- $url = ‘http://’ . $_SERVER[‘HTTP_APPNAME’] . ‘-haokunblog.stor.sinaapp.com/uploads’;
更多移植攻略可参见:
http://www.xiumu.org/diary/wordpress-for-sae.shtml
WordPress For SAE 移植
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。