2011-11-01 4 views
1

모든 파일이 복사되고 MySQL 데이터베이스가 백업되어 새 서버로 복원되었습니다. "More Types"플러그인을 제외하고는 다른 모든 것이 제대로 작동하는 것 같습니다. 자매 플러그인 인 "More Fields"조차도 잘 작동합니다.Wordpress 사이트를 새 서버로 이동 한 후 "더 많은 유형"플러그인을 제외한 모든 기능이 작동합니다

다른 누구도이 문제가 발생 했나요? 그렇다면 어떻게 해결 했습니까?

답변

2

MySQL 백업 및 복원 방법은 무엇입니까? 새 서버에서 업데이트 쿼리를 실행 했습니까 ?? 이렇게 :

UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; 

    /** 
    After that you will need to fix URLs of the WordPress posts and pages, which translated from post slug, and stored in database wp_posts table as guid field. The URL values in this field are stored as abolute URLs instead of relative URLs, so it needs to be changed with the following SQL query: 
    **/ 

    UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com'); 

    /** 
    If you have linked internally within blog posts or pages with absolute URLs, these links will point to wrong locations after you move the blog location. Use the following SQL commands to fix all internal links to own blog in all WordPress posts and pages: 
    **/ 

    UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com'); 
+0

예, 업데이트에이 경로가 포함되었습니다. option_name이 'more_types'인 wp_options 테이블의 레코드를 볼 수 있으며 모든 유형과 옵션을 이전 사이트와 관련이없는 것으로 포함하는 것처럼 보입니다. More Types는 어딘가에 파일에 무엇인가를 저장합니까? – SomethingOn

1

HAha가 문제를 발견했습니다. 옵션 테이블에는 옵션 값의 문자열 길이 값이 포함되어 있으므로 문자열 길이 값을 변경하지 않고 도메인 값을 변경하면 플러그인이 중단됩니다.

이 :

s:23:"http://old-domain.com" 

가되었다 :

s:23:"http://my-new-domain.com" 

의 S를 : (23)가 유효뿐만 아니라 변경해야합니다. 이 문제를 해결하는 한 가지 방법은 플러그인 옵션의 전체 경로를 상대 경로로 변경하는 것입니다 ...

+1

일련 번호가 지정된 배열입니다 (http://php.net/manual/en/function.serialize.php). –

관련 문제