在我新托管的wp网站上建立数据库连接时出错

问题描述:

我现在处境困难..我目前没有托管网站的知识。我开发了一个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. 

请帮助!

该问题可能是这里:

/** 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