2015-11-01 50 views
0

我現在處境困難..我目前沒有託管網站的知識。我開發了一個wordpress網站,並試圖在目前正在工作的域名的woking服務器中託管它。在它是一個靜態網站之前。主機供應商是www.networksolutions.com ..我做託管是,在我新託管的wp網站上建立數據庫連接時出錯

1. exported database from a fully working website in local server (xampp). 
2. exported database file is opened with dreamweaver and edited localhost and repalce with my domain name (www.abc.com) say.. 
3.edited wp_config file like below 

    define('DB_NAME', 'my_db'); 

    /** MySQL database username */ 
    define('DB_USER', 'my_usernm'); //before 'root' 

    /** MySQL database password */ 
define('DB_PASSWORD', 'my_pass'); //before null 

    /** MySQL hostname */ 
    define('DB_HOST', 'www.abc.com'); //before 'localhost' 

    4.uploaded database file in to web server and transfer the website folder in /htdocs using filezilla 

5.Redifined the domain pointing to old folder to my new folder jst uploaded 
    www.oldabc.com -> htdocs/ 
    www.abc.com -> htdocs/abc/ <-here abc folder contains the whole files and folders of my wordpress site. 

6. databse is uploaded sucsessfully but dont know how to link with thespecific ftp account/folder. I have put the username and password in wp_config file same like ausername and password for uploading the database to the phpmyadmin host window. 

請幫助!

回答

1

該問題可能是這裏:

/** MySQL主機*/ 定義( 'DB_HOST', 'www.abc.com'); //'localhost'前

數據庫幾乎總是託管在'localhost'而不是您的域。

嘗試恢復到:

/** MySQL主機*/ 定義( 'DB_HOST', '本地主機');

更多詳細的解答

  1. 我建議你創建WP的默認安裝 - 包括股票數據庫 - 在網路解決方案公司。這將負責配置一切:網站的網址,網站的主頁,數據庫用戶,數據庫密碼等。

  2. 從您的本地安裝下載您的主題,並將其上傳到新的網站。

  3. 然後在您現有的本地WP安裝中,轉至管理>工具>導出,然後選擇要導出到新站點的所有內容。

  4. 轉到新的網站,管理員>工具>導入,然後導入您導出的內容。使用WP導入/導出應該消除覆蓋新數據庫中任何不應該被本地安裝(站點url,主頁url,用戶等)覆蓋的任何內容

+0

感謝您的回覆!問題是,我不能通過託管網站提供的phpmyadmin面板讓任何數據庫用戶。它拋出沒有特權的錯誤。我們必須創建至少一個用戶權限? – Tony

+0

我建議您在NetworkSolutions上創建WP的默認安裝 - 包括庫存數據庫。這將照顧配置一切:網站的網址,網站的家庭,數據庫用戶,Dbase PW等 – webguy

+0

好吧,感謝很多..我會檢查出來! – Tony

相關問題