我处境艰难。到目前为止,我还没有托管网站的知识。我已经开发了一个wordpress网站,并尝试在当前具有工作域的服务器中托管它。在它是静态网站之前。主机提供商是www.networksolutions.com ..我为托管所做的是,
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.
请帮忙!
答案 0 :(得分:1)
问题可能在这里:
/ ** MySQL主机名* / define('DB_HOST','www.abc.com'); //在'localhost'之前
数据库几乎总是托管在'localhost'而非托管域。
尝试恢复为:
/ ** MySQL主机名* / define('DB_HOST','localhost');
更详细的答案
我建议您在NetworkSolutions创建WP的默认安装 - 包括库存数据库。这将负责配置所有内容:站点URL,站点主页,数据库用户,dbase pw等。
从本地安装下载主题,然后将其上传到新网站。
然后在现有的本地WP安装中,转到Admin&gt;工具&gt;导出并选择要导出到新站点的所有内容。
转到新网站,管理员&gt;工具&gt;导入并导入导出的内容。使用WP导入/导出应该消除覆盖新数据库中不应被本地安装(站点URL,主页URL,用户等)覆盖的任何内容。