WordPress whole site moving summary_PHP tutorial
Last year, the pictures were cheap and I wasn’t ready to seriously write blog posts, so I spent a few hundred yuan to buy a domestic space (the domain name has been registered). After purchasing it, I started a WordPress blog and wrote blog posts when I had free time, but I never took the time to write, and I didn’t pursue the quality of the articles. It was okay at first, because I don’t write often, I can accept that the blog cannot be accessed from time to time, I can accept that it can’t be pseudo-static, and I can accept that I can’t interact with social networking sites. In short, as long as the price is cheap, everything is acceptable. But in the first half of 2013, I started to want to write articles. When I visited the website, it often stopped working, sometimes for several days in a row, which was simply unbearable.
So when my space was about to expire, I decided to change my space. I searched online and found Taobao. I thought it would be easy to find a domestic space, after all, the domain name has been registered. But after two days of getting to know each other, I found that there were very few suitable ones.
Mainly related to domain name access issues. When changing the space, you also need to change the domain name registration access provider. To change the access provider , you need to know the password for domain name registration. I forgot my password, I changed my mobile phone, and my email address was my previous corporate email address.
So it is impossible to retrieve the password. If the password cannot be retrieved, the access provider cannot change it. I don’t want to use the original space, so I considered the space in Hong Kong and spent some time to understand it. Regarding the cost of Hong Kong space, I finally decided to choose Hong Kong vps, which is the vps currently used by 1100w.com, linux+apache+php+mysql.
After purchasing a vps, start backing up wordpress. The program is easy to back up, just drag it down through ftp. Then there is the database, because I used virtual space before, and when using the "backup database" function in the background, the backed-up database files always had problems during restoration. So I contacted customer service and directly said that I wanted the mysql database file. After a while, the customer service package was packaged and placed in the virtual space. Because I am currently using a Linux host, Windows files cannot be used under Linux.
So, I set up php+apache+mysql locally and backed up the files locally successfully. Then the database was restored successfully through phpmyadmin in the Linux management background.
After the database is restored successfully, upload the original wordpress file via ftp. After the upload is successful, modify the following places:
1.wp-config.php file, modify the database connection information
<span define</span>('DB_NAME', '数据库名'<span ); </span><span define</span>('DB_USER', '数据库用户名'<span ); </span><span define</span>('DB_PASSWORD', '数据库密码'<span ); </span><span define</span>('DB_HOST', 'localhost');
If the domain name is not changed, the website can be accessed successfully after modifying wp-config.php.
2. If you change the domain name, you need to modify the wp_options table in the database. Modify the fields siteurl and home in the table to the current domain name.
After WordPress is set up, the first task is to change similar connections like www.1100w.com/?p=613 into connections that are more conducive to SEO.
For example: http://www.1100w.com/jquery plug-in to implement web page rating function/
But the previous page needs to implement 301 jump, because after all, some articles still have some traffic and cannot be given up.
So I searched for wordpress 301 redirect from the Internet, and also tried several redirection plug-ins locally. I found that the settings are very troublesome. If you follow the official description, you need to add them one by one, which is impossible because the articles are relatively many.
Finally I found a solution, and it's very simple. I made a mistake at first.
The apache+wordpress environment can support the 301 redirect function very well. There is no need to install any plug-ins or set up .htaccess files.
Solution
We only need to select or set the connection we need in the WordPress background "Settings"->"Fixed Connection". WordPress automatically supports 301 redirection (I learned from the Internet that all new versions of WordPress support it, but I haven’t tested that version yet).
Instructions:
The reason why I didn’t use this method at the beginning was because I built a Windows 7+apache environment locally. After setting up the fixed connection, I found that the web page could not be opened. At the time, I did not think that it was because the rewrite module was not turned on. So we took a detour.
The solution is to open the httpd.conf file, find the following sentence, and remove the # sign in front of it.
#LoadModule rewrite_module modules/mod_rewrite.so.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP and Flutter are popular technologies for mobile development. Flutter excels in cross-platform capabilities, performance and user interface, and is suitable for applications that require high performance, cross-platform and customized UI. PHP is suitable for server-side applications with lower performance and not cross-platform.

You can easily modify your WordPress page width by editing your style.css file: Edit your style.css file and add .site-content { max-width: [your preferred width]; }. Edit [your preferred width] to set the page width. Save changes and clear cache (optional).

Create a product page in WordPress: 1. Create the product (name, description, pictures); 2. Customize the page template (add title, description, pictures, buttons); 3. Enter product information (stock, size, weight); 4 . Create variations (different colors, sizes); 5. Set visibility (public or hidden); 6. Enable/disable comments; 7. Preview and publish the page.

WordPress posts are stored in the /wp-content/uploads folder. This folder uses subfolders to categorize different types of uploads, including articles organized by year, month, and article ID. Article files are stored in plain text format (.txt), and the filename usually includes its ID and title.

WordPress template files are located in the /wp-content/themes/[theme name]/ directory. They are used to determine the appearance and functionality of the website, including header (header.php), footer (footer.php), main template (index.php), single article (single.php), page (page.php), Archive (archive.php), category (category.php), tag (tag.php), search (search.php) and 404 error page (404.php). By editing and modifying these files, you can customize the appearance of your WordPress website

Search for authors in WordPress: 1. Once logged in to your admin panel, navigate to Posts or Pages, enter the author name using the search bar, and select Author in Filters. 2. Other tips: Use wildcards to broaden your search, use operators to combine criteria, or enter author IDs to search for articles.

The most stable WordPress version is the latest version because it contains the latest security patches, performance enhancements, and introduces new features and improvements. In order to update to the latest version, log into your WordPress dashboard, go to the Updates page and click Update Now.

WordPress is developed using PHP language as its core programming language for handling database interactions, form processing, dynamic content generation, and user requests. PHP was chosen for reasons including cross-platform compatibility, ease of learning, active community, and rich library and frameworks. Apart from PHP, WordPress also uses languages like HTML, CSS, JavaScript, SQL, etc. to enhance its functionality.
