Recently, I transferred this little station that no one visited from Typecho back to Wordpress. There is no special reason. I just changed the host and wanted to toss. Typecho is excellent, but it has not been updated, giving the impression that no one is maintaining it (it seems that a new version will be released soon).
What I have learned and done has nothing to do with half a dime in the IT industry. I am a pure layman. In order to smooth the whole process, Wordpress was installed directly from Tencent cloud background with one click. The whole process was very smooth, but there were some small problems. Let's make a record for the next toss.
1. How to import Wordpress from typecho
- Use Byetyp, see: Typecho seamless migration to wordpress plug-in ByeTyp
2. PHP error
- After installing the theme, it is found that some PHP error codes appear mysteriously before the articles. Found a universal solution from the Internet: in functions.php (or fun.php) <? PHP is perfectly solved by adding the following code:
error_reporting(0);
3. When modifying the administrator's mailbox and user's mailbox, you can't receive the confirmation email
-
**Reason: * * in order to avoid spam, major host service providers do not support the mail () function of sending mail, and can only enable SMTP to send mail.
-
**Solution: * * install the WP Mail SMTP plug-in and successfully set the SMTP of mailbox 163
4. wordpress turns on https background login without response
- Because Tencent cloud needs to be filed, the domain name cannot be accessed during the filing period. During this period, directly log in to the Wordpress background with public ip to do all kinds of transfer and decoration work. After setting HTTPS in the background of Tencent cloud, there is a problem that the background login does not respond. For solutions, see: wordpress and imperial cms websites are configured with https(SSL) and cannot log in to the background
1) . open the website root directory file \ WP includes \ functions.php and find the code require (abspath. Wpinc. '/ option.php'); About line 8.
Add the following code below:
<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="" cid="n19" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; background-position: inherit inherit; background-repeat: inherit inherit;">add_filter('script_loader_src', 'agnostic_script_loader_src', 20,2); function agnostic_script_loader_src($src, $handle) { return preg_replace('/^(http|https):/', '', $src); } add_filter('style_loader_src', 'agnostic_style_loader_src', 20,2); function agnostic_style_loader_src($src, $handle) { return preg_replace('/^(http|https):/', '', $src); } </pre>
2) Open the website root directory \ wp-config.php file to find the code
<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="" cid="n21" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; background-position: inherit inherit; background-repeat: inherit inherit;">* * @package WordPress */</pre>
Add the following code below:
<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="" cid="n23" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; background-position: inherit inherit; background-repeat: inherit inherit;">$_SERVER['HTTPS'] = 'on'; define('FORCE_SSL_LOGIN', true); define('FORCE_SSL_ADMIN', true);</pre>
After completing the above two steps, you can normally access the WordPress website background. Log in to the WordPress background, click the settings - General - General option, and change the WordPress address (URL) and site address (URL) to the link address starting with https: / / (e.g https://www.aceact.com ), and then click "save changes".
5. After CDN is set, the web page content cannot be updated in real time
- After installing CDN, the whole site CDN cache of WordPress website. When publishing or updating articles, submitting comments, or comments are approved, the server cannot automatically refresh the CDN cache. This will cause the website content to not be updated in time, and the page seen by others may still be the old page provided by CDN server. To solve this problem, you can manually refresh the CDN cache after Tencent cloud. But a simpler way is to install CDN caching plug-ins, such as Tencent cloud CDN or zhangb TCDn.
6. Which is a free drawing bed
- Shoot the clouds again , qiniu cloud, and even gitee and GitHub are good choices. For the settings of cloud shooting, see: Cloud network attack protection settings and PicGo+Typora + cloud free picture bed construction
For the original text, see: Problems and solutions in switching back from Typecho to Wordpress