WordPress For SAE 移植
Posted CIBLE
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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’;
更多移植攻略可参见:
以上是关于WordPress For SAE 移植的主要内容,如果未能解决你的问题,请参考以下文章
markdown 在WordPress中使用jQuery代码片段