Some wordpress modifications and wordpress skills after the PHP version is upgraded to 7x

Source: Internet
Author: User
Tags vps server wordpress version
: This article mainly introduces some wordpress modification and wordpress skills after the PHP version is upgraded to 7x. For more information about PHP tutorials, see. I don't know if it's a cheap task. I upgraded the php on the VPS server to 7.0, although 7. x is highly compatible with earlier versions, but a lot of outdated usage is removed, while some old applications are still in use. For errors on personal wordpress sites, the correction record is as follows. All are plug-ins and wordpress official programs are fine.

Change the mysql_escape_string () function to addslashes ()

Wp-thread-comment plugin wp-content/plugins/wordpress-thread-comment/wp-thread-comment.php has multiple

Mysql _ * series functions are removed in php7. Therefore, we recommend that you search for functions such as mysql_query, mysql_escape _, and mysql_real_eacape in all files, such: grep-r mysql_query/path/to/your/site

Change the split () function to explode ()

Auto-save-image Plugin wp-content/plugins/auto-save-image/auto-save-image.php 122 lines

Syntax compatibility

Configure SMTP plug-in wp-content/plugins/configure-smtp/configure-smtp.php line 171, add default values for function definitions

Public function options_page_description ($ localized_heading_text = ''){

PS: WordPress tips: manually restore to the old version/update to the latest version

WordPress background can be upgraded directly with one click, but there are some situations that may cause automatic upgrades, in a simple example, the method for manually restoring wordpress to the old version and manually updating WordPress to the latest version is the same. it can be said that it is manually updated to any version.

WordPress is restored to the old version

WordPress updates are frequent, but some theme and plug-in updates are not keeping up with the speed. Therefore, after you update wordpress, you may find that the theme or plug-in you are using Conflicts. at this time, you may consider restoring wordpress to the old version.

After WordPress is restored to the old version, you can install the old version. However, some configuration options of your original plug-in or topic will become invalid, manually restore the old version.

1. download the old WordPress version

Download the current language version (if you use the official Chinese version, download the old version of the official Chinese version, if it is the original English version, download the old version of the English version)

2. change the WordPress program file

(1) decompress the downloaded old version, delete the decompressed wp-content folder, and use FTP to upload other files to overwrite the original files.

Note: Host space wp-content folder contains themes and plug-ins and other files, the root directory of the wp-config.php is the WordPress configuration file, remember not to overwrite these files !!

(2) visit http: // your website/wp-admin/. a page will appear, prompting you to update the database and click Update, you can recover to the old version of wordpress.

Manually update WordPress to the latest version.

The operation for updating wordpress to the latest version is the same as above. The difference is that you can download the latest version. With manual operations, you can change to any version (of course, if the version difference is too large and the database structure is different, it may fail)

The above introduces some wordpress modification and wordpress skills after the PHP version is upgraded to 7x, including some content, and hope to help those who are interested in the PHP Tutorial.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.