Toggle navigation

WordPress Image Guide

Version 4.8.1

Websoft9 WordPress is a pre-configured, ready to run image for running WordPress on Alibaba Cloud.

WordPress is open source software you can use to create a beautiful website, blog, or app.There 28% of the web uses WordPress, from hobby blogs to the biggest news sites online in the world.Beautiful designs, powerful features, and the freedom to build anything you want. WordPress is both free and priceless at the same time.Extend WordPress with over 45,000 plugins to help your website meet your needs. Add an online store, galleries, mailing lists, forums, analytics, and much more.

Application Software(WordPress4.8.1)
Software directory: /data/wwwroot/wordpress

Infrastructure(PHP7.0,APACHE2.4)
PHP Configuration File: /etc/php.ini
Default Apache Vhost Configuration File: /etc/httpd/conf.d/vhost.conf
Apache Vhost Configuration directory: /etc/httpd/conf.d
Apache Log Files: /var/log/httpd

Database(MYSQL5.7)
Database install directory: /usr/share/mysql
Database data directory:  /data/mysql
Database Configuration File: /etc/my.cnf
PhpMyAdmin install directory: /usr/share/phpmyadmin

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address and you can enter the installation page directly,if there no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

It is recommended to complete two steps before the the installation:

  • Domain resolution if you want to use domain for this application (Add an A record to the Internet IP Address of Server from Domain Control Panel)
  • Modify the MySQL password of root through http://Internet IP Address/phpmyadmin

Then access the installation page and complete the installation wizard for the following steps:

  1. Local Chrome or Firefox to visit http://yourdomain or http://Internet IP Address,you will enter the configuration inerface of installation,Select the language,Click “Continue”;
    wp01
  2. Click “Les’s go!”
    wp02
  3. Fill in your database user, password, and database name;Click “Submit”
    wp04
  4. Click “Run the install”
    wp05
  5. Set administrator user, password and mail;Click “Install WordPress”
    wp06
  6. OK, it has been installed successfully.
  7. Use http://<domain name>/wp-admin  to login to your administration.
    wp07

Three usernames and passwords are required for application installation, application using, andapplication maintenance:

1、WordPress:Username and Password is set by youself when installation,
Backend URL:http://youdomain.com/wp-admin
2、MySQL Database:Default username and password is root/123456
Control Panel URL:http://Internet IP Address/phpmyadmin
3、Linux Server:Username is root,Password is set by youself when buying.
Please Using the Putty for ssh remote and WinSCP for SFTP

Note:You can reset the password of OS through Cloud Console if you have forgotten it

Connect to a Linux instance using Windows OS

This section uses PuTTY as an example. PuTTY can be downloaded here.

You can connect to a Linux instance via PuTTY as follows:

  1. Start Putty.exe.
  2. Enter the public IP address of the instance in Host Name (or IP address).
  3. Use the default port 22.
  4. Select SSH as Connection Type.
  5. Type a session name in Saved Sessions, and then click Save. In later logins, you may directly load the session without re-entering the IP address.
  6. Click Open to connect.
  7. Upon first connection, the following dialog box will be displayed. Click Yes.
  8. As prompted, enter the username and password for the Linux ECS instance. The password will not be displayed on-screen. Press the Enter key to complete connection to the instance.

When you connect your computer to the Linux instance successfully, you can operate the instance from your computer.

Use SFTP you can mange file,upload and download file,configure Server.

  1. Start WinSCP. Login Dialog will appear.
  2. Then select your File protocol(SFTP) on the dialog
  3. Enter your host name to Host name field, username to User name and password to Password like below
  4. You may want to save your session details to a site so you do not need to type them in every time you want to connect. Press Save button and type site name.
  5. When appear the dialog below,please select the “yes”
  6. You can manane Linux file below
  7. WinSCP can integrate the Putty and transfer the log in information to Putty
  8. Now you can use Putty(Not need to log in) from the menu bar of WinSCP

Following is the step for access phpMyadmin

  1. Open Chrome or Firefox on your local PC
  2. visit the http://Internet IP Address/phpMyAdmin,you can enter the login page
  3. select you language,Username:root,Password:123456
  4. Click the button “Go”

Routine backup (archives) of the database and application setup is essential to ensure failover is smooth.

Backup is based on the server snapshot automatic backup,manual local backup,using plugin to backup in three ways, three of which have their own advantages and disadvantages, it is recommended to use together

Automatic Backup by Snapshot of Server

IaaS provider have the “snapshot” function for Server, the snapshot is for the server disk. Snapshot tool can record the specified point in time the hard disk data, all backed up, and can achieve a key recovery.

If you have an automatic snapshot of the disk settings, the following scenes you can be more calm face:

  • Work a few days of the results, was mistakenly deleted
  • Hackers damage your site
  • The content has been messed up

Done a snapshot backup, a key to restore to the backup point of time state. That is, on-site reduction, very good function.

Different cloud vendor snapshot settings slightly different, specific reference:

Manual Backup

  1. Download the entire WordPress file in you root dictionary by FTP or other tools
  2. Visit http://< Public net IP >/phpMyAdmin,login in to the phpMyAdmin Panel
  3. Select you database,then Export
  4. Click “go” button,then download the backup file

 

Using Plugin Automatic Backup

Automatic Backup is very useful and efficient for your system maintenance.

You can use the “UpdraftPlus WordPress Backup Plugin” to implement the Automatic Backup. UpdraftPlus simplifies backups (and restoration). Backup into the cloud (Amazon S3 (or compatible), Dropbox, Google Drive, Rackspace Cloud, DreamObjects, FTP, Openstack Swift, UpdraftPlus Vault and email) and restore with a single click. Backups of files and database can have separate schedules. The paid version also backs up to Microsoft OneDrive, Microsoft Azure, Google Cloud Storage, SFTP, SCP, and WebDAV.

  1. Administration Screen > Plugins > Installed Plugins
  2. Search the “UpdraftPlus”,install it and active it
  3. Now you’re ready to set up your backups – what you want to configure, when, how, etc. Just find the right page, and you’re away

 

You should always update WordPress to the latest version. When a new version of WordPress is available you will receive an update message in your WordPress Admin Screens. To update WordPress, click the link in this message.

There are two methods for updating – the easiest is the one-click update, which will work for most people. If it doesn’t work, or you just prefer to be more hands-on, you can follow the manual update process.

 

One-click update

Going to the Dashboard > Updates screen. Once you are on the “Update WordPress” page, click the button “Update Now” to start the process off. You shouldn’t need to do anything else and, once it’s finished, you will be up-to-date.

One-click updates work on most servers. If you have any problems, it is probably related to permissions issues on the filesystem.

 

Manual Update

Manual update is more complicated than One-click update,you should check out the extended upgrade instructions before you update.

Step one

  1. Get the latest WordPress zip (or tar.gz) file.
  2. Unpack the zip file that you downloaded.
  3. Deactivate plugins.
  4. Delete the old wp-includes and wp-admin directories on your web host (through your FTP or shell access).
  5. Using FTP or your shell access, upload the new wp-includes and wp-admin directories to your web host, in place of the previously deleted directories.
  6. Upload the individual files from the new wp-content folder to your existing wp-content folder, overwriting existing files. Do NOT delete your existing wp-content folder. Do NOT delete any files or folders in your existing wp-content directory (except for the one being overwritten by new files).
  7. Upload all new loose files from the root directory of the new version to your existing wordpress root directory

NOTE – you should replace all the old WordPress files with the new ones in the wp-includes and wp-admin directories and sub-directories, and in the root directory (such as index.php, wp-login.php and so on). Don’t worry – your wp-config.php will be safe.

Be careful when you come to copying the wp-content directory. You should make sure that you only copy the files from inside this directory, rather than replacing your entire wp-content directory. This is where your themes and plugins live, so you will want to keep them. If you have customized the default or classic themes without renaming them, make sure not to overwrite those files, otherwise you will lose your changes. (Though you might want to compare them for new features or fixes..)

Lastly you should take a look at the wp-config-sample.php file, to see if any new settings have been introduced that you might want to add to your own wp-config.php.

Step two

Visit your main WordPress admin page at /wp-admin. You may be asked to login again. If a database upgrade is necessary at this point, WordPress will detect it and give you a link to a URL like http://example.com/wordpress/wp-admin/upgrade.php. Follow that link and follow the instructions. This will update your database to be compatible with the latest code. You should do this as soon as possible after step 1.

Don’t forget to reactivate plugins!

Step three

f you have caching enabled, clear the cache at this point so the changes will go live immediately. Otherwise, visitors to your site (including you) will continue to see the old version (until the cache updates).

Your WordPress installation is successfully updated. That’s as simple as we can make it without Updating WordPress Using Subversion.

Consider rewarding yourself with a blog post about the update, reading that book or article you’ve been putting off, or simply sitting back for a few moments and letting the world pass you by.

Final Steps

Your update is now complete, so you can go in and enable your Plugins again. If you have issues with logging in, try clearing cookies in your browser.

note:If anything has gone wrong, then the first thing to do is go through all the steps in our extended upgrade instructions. That page also has information about some of the most common problems we see.

 

A WordPress Theme is a collection of files that work together to produce a graphical interface with an underlying unifying design for a weblog. These files are called template files. A Theme modifies the way the site is displayed, without modifying the underlying software. Themes may include customized template files, image files (*.jpg, *.gif), style sheets (*.css), custom Pages, as well as any necessary code files (*.php). For an introduction to template files, see Stepping Into Templates.

You can get you theme by /content/themes

After default installation,WordPress comes with three themes for you: the default Twenty Fifteen theme, and previous defaults Twenty Fourteen theme and Twenty Thirteen theme. You can switch between Themes using the Appearance admin panel. Themes that you add to the theme directory will appear in the Administration Screen > Appearance > Themes as additional selections.

Adding New Themes

  1. Download or prepare a theme which has been packaged and the suffix of the package is zip
  2. Login to the WordPress,go to Administration Screen > Appearance>Themes>Add new
  3. upload Themes or one Click the online themes,you can install the theme
  4. After installation of theme,you should active it by Administration Screen > Appearance > Themes
  5. From the Themes panel, roll over the Theme thumbnail image for the Theme to activate the Theme click the Activate button.

Note:If you have any problems, it is probably related to permissions issues on the file system.

 

Update Theme

You can get the update guide for theme from the theme provider,but there also have a general update method

  1. Backup all you data and files of WordPress site
  2. delete the your theme by FTP or Linux shell or Panel
  3. upload your theme and unzip it
  4. file system permission setting
  5. active the themes
  6. complete the more updating process of  you theme

 

Plugins are ways to extend and add to the functionality that already exists in WordPress.

For instructions and information on downloading, installing, upgrading, troubleshooting, and managing your WordPress Plugins, see Managing Plugins. If you want to develop your own plugin, there is a comprehensive list of resources in Plugin Resources.

Adding New Plugins

Add new plugins is very easy and similar with the add new themes

  1. Administration Screen > Plugins > Add New
  2. Search the plugins which you want,and install it,active it
  3. you can also add plugins by upload you package of zip

Update Plugins

There have two method for update plugins

Method One

  1. Administration Screen > Plugins > Installed Plugins
  2. You can update Plugins by one-click “update now” if there have new version for plugin

 

Method Two

  1. Backup all you data and files of WordPress site
  2. Deactivate the plugin
  3. delete the plugin by FTP or Linux shell or Panel
  4. upload your plugin and unzip it if necessary
  5. check you file system permission setting
  6. active the plugin

The PHP configuration file allows you to configure the modules enabled, the email settings or the size of the upload files. It is located at /etc/php.ini.

There are some PHP settings that need to be sufficient when running your application,The values for PHP.ini below are suggested values only.

  • memory_limit – Minimum: 128M Recommended: 512M or better
  • upload_max_filesize – Minimum: 20M
  • post_max_size – Minimum: 20M
  • max_execution_time: At Least 120 Recommended: 300

After modifying the PHP configuration file, restart both Apache and PHP-FPM for the changes to take effect:

# systemctl restart httpd

How to modify the allowed limit for upload?

Modify the  /etc/php.ini file to increase the allowed size for uploads:

; Maximum size of POST data that PHP will accept.
post_max_size = 16M
; Maximum allowed size for uploaded files.
upload_max_filesize = 16M

then,restart the apache

# systemctl restart httpd

How to change the max_execution_time?

If you receive the message “Maximum execution time of 30 seconds exceeded”.You may also like to extend the max_execution_time for PHP and you can modify it by two methods below

Method one: edit your  /etc/php.ini


; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 90
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.

Method two: edit your .htaccess:


<IfModule mod_php5.c>
php_value max_execution_time 90
</IfModule>

Coming Soon…

Use domain you should complete the following steps:

Step One:Domain resolution

e.g,If you using the AliCloud Domain product,you should log in to your Domain Console Panel

And find the domain name resolution interface,then add an A record to the Internet IP Address of Server from Domain Control Panel.

Step Two:Modify the Vhost file

  1. Using SFTP to edit the /ect/httpd/conf.d/vhost.conf
  2. Modify the domain related information like below,then save it
    <VirtualHost *:80>
    ServerName www.mydomain.com
    ServerAlias mydomain.com
  3. Using putty to run the command “systemctl restart httpd”

When update the WordPress new version or themes and plugins is not successful,may be the permissions of file and folder is not appropriate,you should change it

Web site root permissions to follow:
file 644, folder 755 ,Permissions Users and groups www
If there is a file permissions problem, execute the following three commands:

chown -R www.www /data/wwwroot/default/wordpress
find /data/wwwroot/default/wordpress -type d -exec chmod 755 {} \;
find /data/wwwroot/default/wordpress -type f -exec chmod 644 {} \;

You can add more WordPress site by the following step:

  1. uploading the WordPress_version.zip file to /data/wwwroot
  2. unzip the zip file
  3. rename the floder, ex. abc.com
  4. set the permission:file 644, folder 755 ,Permissions Users and groups www
  5. new database and database user
  6. set you domain to mapping the /data/wwwroot/default/abc.com
  7. add new the configuration file in the /etc/httpd/conf.d/
  8. use chrome or firefox to visit http://youdomain/ and start intallation

Apache http service

~# systemctl start httpd
~# systemctl stop httpd
~# systemctl restart httpd

MySQL  service

~# systemctl start mysqld
~# systemctl stop mysqld
~# systemctl restart mysqld

This document is original from Websoft9.In order to ensure the seriousness and usability of the documentation, no one may misappropriate or modify the second distribution. The need for friends reproduced please mark the source, otherwise we reserve the right to give legal action.

We will periodically update the documentation. Please visit the online documentation for the latest version

This document URL: http://en.websoft9.com/xdocs/wordpress-image-guide/
Support & Partnership: http://en.websoft9.com