PHP version upgrade to 7.x after WordPress some changes and WordPress tips _php Example

Source: Internet
Author: User
Tags vps server wordpress update

Do not calculate the hands of cheap, the VPS server to upgrade PHP to 7.0, although the 7.x compatibility with the previous is very high, but removed a lot of outdated usage, and some old applications are still in use. On the individual WordPress site errors, the correction record is as follows. All Plug-ins, WordPress official procedures, is no problem.

The mysql_escape_string () function is changed to Addslashes ()

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

Mysql_* series functions are removed in PHP7, so it is recommended to search all files for mysql_query, mysql_escape_, mysql_real_eacape functions such as: Grep-r mysql_query/path/ To/your/site

The split () function is changed to explode ()

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

Syntax compatible

Configure SMTP Plug-in wp-content/plugins/configure-smtp/configure-smtp.php 171 lines, adding default values for function definitions

Public Function options_page_description ($localized _heading_text = ') {

Ps:wordpress tips: Manually revert to the old version/update to the latest edition

WordPress Backstage General can be directly a key upgrade, but there are also some circumstances that can not automatically upgrade, so, advocating a simple WordPress restore to the old version and WordPress manually updated to the latest edition of the method, in fact, the operation is the same, Can be said to be manually updated to any version.

WordPress revert to old version

WordPress Update is more frequent, but some themes and plug-ins update is not up to speed, so when you update WordPress, you may find and now use the theme or Plug-ins conflict, at this time, you may consider to restore WordPress to the old version.

WordPress revert to the old version, you can install the old version of the new, but, this way, your original plug-in or the theme of some settings will be invalidated, so, the initiative suggested that manual operation to restore the old version.

1. Download the corresponding old version of WordPress

Download the language version you are currently using (that is, if you use the official Chinese version, download the old version of the official Chinese, if the original English, download the Old English version)

2. Replace the WordPress program file

(1) Unzip the old version of the download, and then delete the extracted Wp-content folder, using FTP upload other files overwrite the original file.

Note: Host space Wp-content folder has themes and plug-ins and other files, the root directory wp-config.php inside the wordpress configuration file, remember not to overwrite these files!!

(2) Visit http://your website/wp-admin/, a bit wait will appear a page, hint you need to update database, click Update, can revert to old version of WordPress.

WordPress manually update to the latest version

The

WordPress update to the latest version of the operation and above is the same, the difference is that you download the version is the most new. With manual operation, you can change to any version (of course, if the version gap is too large, the database structure is different, it may not succeed)

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.