Home > CMS Tutorial > WordPress > body text

How to upload wordpress to virtual host

藏色散人
Release: 2019-07-25 09:49:15
Original
3049 people have browsed it

How to upload wordpress to virtual host

How to upload wordpress to the virtual host

1. First, put the planned debugging website compression package into the root directory , such as "D:\wamp\www"

2. Unzip the entire website data in the root directory, such as "D:\wamp\www\wordpress"

3. Access through the local port , such as "http://localhost:8085/" (the link is local only), click on the website project you need to enter

4. Click to enter the WordPress local backend management and perform all on-site operations and planning before the website goes online.

http://localhost:8085/wordpress/wp-login.php (link is local only)

After building all the websites locally, you need to pay attention to a few things when uploading them to the virtual host Click:

First, back up the local website files, compress them, and upload them to the root directory of the virtual host, usually the public_html directory.

Second, log in to the local phpMyAdmin and export the local database. Click "Export" and select the gizipped compression method.

Third, create a blank database on the virtual host, log in to the remote phpMyAdmin, and import the local database file. Taking the cPanel panel as an example, click MySql Databases and enter the database name. Click Create;

Fourth, import the database, enter the virtual host database management page, click the Import option, and import the local database file just compressed.

Fifth, repair the domain name and URL link

The local domain name and the URL of the virtual host are different, and the webmaster needs to modify them in phpMyAdmin. What needs to be modified includes the WordPress address, homepage address, and article Guid, link address in the text, etc. For example, the following code converts the local debugging address into a website address, and cn.bluehost.com is the uploaded domain name.

“
UPDATE wp_options SET option_value = replace(option_value,‘localhost/test’,‘cn.bluehost.com’) WHERE option_name =‘home’ OR option_name=‘siteurl’;
”
Copy after login

In addition, you also need to modify the wp-config.php file and modify the database link address. Generally speaking, this can complete uploading the WordPress website of the local server to the virtual host.

Of course, you can also install the WordPress template station directly in the virtual host background. However, this way the website will directly face the search engines, which may have some disadvantages for optimization.

For more WordPress technical articles, please visit the WordPress Tutorial column!

The above is the detailed content of How to upload wordpress to virtual host. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template