Some time ago, a small partner talked in the group about using a second-level domain name to load wordpress website images. There were many such tutorials a long time ago, and Mr. V didn't have to repeat them, however, since wordpress3.5, the options for setting the upload path in the background are no longer available, so let's take a wordpress tutorial here. Add the following code to the topic's functions. Php file:
If (get_option ('upload _ path') = 'WP-content/uploads' | get_option ('upload _ path') = null ){
Update_option ('upload _ path', WP_CONTENT_DIR. '/uploads ');
}
Then go to the multimedia settings page under the Settings option, as shown in the figure below:
Then you can see the following options:
The default Upload path does not need to be modified. You only need to fill in your second-level domain name in the complete URL of the file, and then log on to the background of the space to direct the domain name to the default Upload path directory. Log on to the domain name background to resolve the domain name to the space, log on to phpmyadmin, select the database to install wordpress, and execute the following SQL query:
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http: // www.111cn.net/uploads/', 'http: // m.111cn.net /');
Replace the data table prefix and domain name in the SQL statement with your own. If you have not modified the default data table prefix, you only need to replace it and execute the SQL statement.