bitnami wordpress

27
Bitnami WordPress How-To Guides 1. How to start/stop the servers? 1.1. Graphical Tool 1.2. Command-line Tool 2. How to change the default URL to root? 2.1. Automatic Approach 2.2. Manual Approach 3. How to change the URL to another suburi? 4. How to change the WordPress domain name? 5. How to create a full backup of WordPress? 5.1. Backup 5.2. Restore 6. How to upgrade WordPress? 7. How to install a plugin on WordPress? 8. How to install all-in-one WP migration plugin? 9. How to install WP-DBManager? 10. How to configure the email settings of WordPress? 11. How to translate WordPress to my language? 12. How to edit the WordPress files? 13. How to enable SSL? 14. How to debug WordPress errors? 15. How to reset the WordPress admin password from the command line? 16. How to increase the allowed size of the uploaded files? 17. How to disable the WordPress wp- cron.php? 18. How to install several WordPress modules on the same stack? 19. How to enable CORS in Wordpress 20. How to configure WordPress for cloud storage on Amazon S3? Troubleshooting 1. I can not access to my WordPress application 2. WordPress can not load images or CSS 3. My WordPress tries to contact external sites when I log in. What can I do? How to Upgrade Your Amazon Instance 1. How can I create a backup of my instance? 2. How do I migrate the data to a new Bitnami WordPress instance? 2.1. Automatic Approach 2.1.1. Exporting the Wordpress Installation 2.1.2. Importing the Wordpress Installation 2.2. Manual Approach 2.2.1. Backing up the files 2.2.2. Copying files to the new instance 2.2.3. Restoring files in the new instance 3. How do I associate the previous IP address with the new instance? Migration from local installation to the cloud 1. Export WordPress Content 2. Import WordPress Content

Upload: examenvb

Post on 27-Jan-2016

124 views

Category:

Documents


7 download

DESCRIPTION

wordpress 2017php 8mysql 2016

TRANSCRIPT

Page 1: Bitnami WordPress

Bitnami WordPress

How-To Guides

1. How to start/stop the servers?1.1. Graphical Tool1.2. Command-line Tool

2. How to change the default URL toroot?

2.1. Automatic Approach2.2. Manual Approach

3. How to change the URL to anothersuburi?4. How to change the WordPressdomain name?5. How to create a full backup ofWordPress?

5.1. Backup5.2. Restore

6. How to upgrade WordPress?7. How to install a plugin onWordPress?8. How to install all-in-one WPmigration plugin?9. How to install WP-DBManager?10. How to configure the emailsettings of WordPress?11. How to translate WordPress to mylanguage?12. How to edit the WordPress files?13. How to enable SSL?14. How to debug WordPress errors?15. How to reset the WordPress adminpassword from the command line?16. How to increase the allowed size ofthe uploaded files?17. How to disable the WordPress wp-cron.php?18. How to install several WordPressmodules on the same stack?19. How to enable CORS in Wordpress20. How to configure WordPress forcloud storage on Amazon S3?

Troubleshooting

1. I can not access to my WordPressapplication2. WordPress can not load images orCSS3. My WordPress tries to contactexternal sites when I log in. What can Ido?

How to Upgrade Your AmazonInstance

1. How can I create a backup of myinstance?2. How do I migrate the data to a newBitnami WordPress instance?

2.1. Automatic Approach2.1.1. Exporting the WordpressInstallation2.1.2. Importing the WordpressInstallation

2.2. Manual Approach2.2.1. Backing up the files2.2.2. Copying files to the newinstance2.2.3. Restoring files in the newinstance

3. How do I associate the previous IPaddress with the new instance?

Migration from local installation tothe cloud

1. Export WordPress Content2. Import WordPress Content

www.princexml.com
Prince - Personal Edition
This document was created with Prince, a great way of getting web content onto paper.
Page 2: Bitnami WordPress

21. How to transfer the WordPressdatabase to Amazon Web Services?22. Multisite Support

How to optimize a default BitnamiWordPress install

1. WP Super Cache2. Quick Cache3. Minify4. Varnish

4.1. Test and activate the Varnishservice

WordPress is a state-of-the-art publishing platform with a focus onaesthetics, web standards, and usability. WordPress is both free andpriceless at the same time. The project was started in 2003. Sincethen it has grown to be the largest self-hosted blogging tool in theworld, used on millions of sites and seen by tens of millions of peopleevery day.

Please, take a look to the Quick Start Guide to know the basic use ofthis Stack.

How to start/stop the servers?

Cloud Server

Each Bitnami stack includes a control script that lets you easily stop,start and restart servers.

The script is located at /opt/bitnami/ctlscript.sh. Call it without anyarguments to restart all services:

$ sudo /opt/bitnami/ctlscript.sh start

Or use it to restart a specific service only by passing the service nameas argument - for example 'mysql':

$ sudo /opt/bitnami/ctlscript.sh restart mysql

Virtual Machine

Page 3: Bitnami WordPress

Each Bitnami stack includes a control script that lets you easily stop,start and restart servers.

The script is located at /opt/bitnami/ctlscript.sh. Call it without anyarguments to restart all services:

$ sudo /opt/bitnami/ctlscript.sh start

Or use it to restart a specific service only by passing the service nameas argument - for example 'mysql':

$ sudo /opt/bitnami/ctlscript.sh restart mysql

Native Installer

You can use either the graphical manager tool or the command-linetool to start and stop the servers.

Graphical Tool

Bitnami stacks include a graphical tool to manage the servers easily(native installers only). Using this tool, you can start, stop and restartthe servers and check the log files.

manager-servers.png

Page 4: Bitnami WordPress

On Windows:

• Double-click the "manager-windows.exe" file in your installationdirectory.

• You can also start the Manager tool using the Start Menu pathStart -> Program Files -> Bitnami Stack -> Manager.

On Linux and Mac OS X:

• Double-click the "manager-osx" or "manager-linux-*" tool inyour installation directory.

Command-line Tool

Each Bitnami stack includes a control script that lets you easily stop,start and restart servers.

The control script is only available for Linux and Mac OS X nativeinstallers. The script is located in your installation directory andnamed ctlscript.sh. Call it without any arguments to restart allservices.

On Linux:If your installation directory is /home/USER/wordpress-4.0.1-0, callthe control script with the ‘start’ argument to start all servers. Forexample:

$ cd /home/USER/wordpress-4.0.1-0$ ./ctlscript.sh start

Or use it to restart a specific service only by passing the service nameas argument - for example 'mysql':

$ cd /home/USER/wordpress-4.0.1-0$ ./ctlscript.sh restart mysql

On Mac OS X:If your installation directory is /Applications/wordpress-4.0.1-0, callthe control script with the ‘start’ argument to start all servers. Forexample:

$ cd /Applications/wordpress-4.0.1-0$ ./ctlscript.sh start

Page 5: Bitnami WordPress

Or use it to restart a specific service only by passing the service nameas argument - for example 'mysql':

$ cd /Applications/wordpress-4.0.1-0$ ./ctlscript.sh restart mysql

Tabs end

How to change the default URL to root?

This approach describes how to configure your application to run inthe root URL directly. Also, you will be able to modify the URL toa NEW_DOMAIN using the bnconfig tool. The details are describedbelow.

Automatic Approach

This approach is based on the Bitnami Configuration Tool (bnconfig).

Bitnami Cloud Hosting

The best way to change your URL in BCH is to go to your applicationtab and modify it there. In the Bitnami Cloud Hosting console, selectServers, choose your server, Manage and go to the Applications tab.Press there the pencil next to the application which URL you want tomodify and choose Use Custom Domain.

Refer to this guide for more information.

Cloud Images and Virtual Machines

Moving the application to /

If your application is running in "/wordpress" you can remove theprefix from the URL executing the following command:

$ sudo /opt/bitnami/apps/wordpress/bnconfig --appurl /

(use --help to check if that option is available for your application)

Now you will be able to access to the application athttp://YOUR_DOMAIN instead of http://YOUR_DOMAIN/wordpress.

Updating the IP or hostname

Page 6: Bitnami WordPress

Some applications require to update the IP/domain if the machine IP/domain changes. The bnconfig tool also has an option which updatesthe IP automatically during boot, called machine_hostname (use --helpto check if that option is available for your application). Note that thistool changes the URL to http://NEW_DOMAIN/wordpress.

sudo /opt/bitnami/apps/wordpress/bnconfig --machine_hostname NEW_DOMAIN

If you already moved your application to the root URL you shouldinclude both options at the same time.

sudo /opt/bitnami/apps/wordpress/bnconfig --appurl / --machine_hostname NEW_DOMAIN

If you have configured your machine to use an static domain name orIP, you should rename or remove the "/opt/bitnami/apps/wordpress/bnconfig" file.

sudo mv /opt/bitnami/apps/wordpress/bnconfig /opt/bitnami/apps/wordpress/bnconfig.disabled

Native Installer

Remember to use your actual installation directory instead ofinstalldir.

Moving the application to /

If your application is running in "/wordpress" you can remove theprefix from the URL executing the following command:

On Linux,

installdir/apps/wordpress/bnconfig --appurl /

On Mac OS X,

installdir/apps/wordpress/bnconfig.app/Contents/MacOS/installbuilder.sh --appurl /

On Windows,

installdir/apps/wordpress/bnconfig.exe --appurl /

(use --help to check if that option is available for your application)

Now you will be able to access to the application athttp://YOUR_DOMAIN instead of http://YOUR_DOMAIN/wordpress.

Page 7: Bitnami WordPress

Updating the IP or hostname

Some applications require to update the IP/domain if the machine IP/domain changes. The bnconfig tool also has an option which updatesthe IP , called machine_hostname (use --help to check if that option isavailable for your application). Note that this tool changes the URLto http://NEW_DOMAIN/wordpress.

installdir/apps/wordpress/bnconfig --machine_hostname NEW_DOMAIN

If you already moved your application to the root URL you shouldinclude both options at the same time.

installdir/apps/wordpress/bnconfig --appurl / --machine_hostname NEW_DOMAIN

Tabs end

Manual Approach

If you want to change the default URL from http://your_domain/wordpress to http://your_domain, edit the installdir/apps/wordpress/conf/httpd-prefix.conf file so that it looks like the file below:

DocumentRoot "/installdir/apps/wordpress/htdocs"# Alias /wordpress/ "/installdir/apps/wordpress/htdocs/"# Alias /wordpress "/installdir/apps/wordpress/htdocs"

(...)

Remember that you must substitute installdir with your actualinstallation directory (for native installers) or /opt/bitnami (for cloudimages and virtual machines).

Some applications also require additional changes in theirconfiguration files or in their database.

It is also necessary to modify the RewriteBase option to remove the"/wordpress" prefix in the /installdir/apps/wordpress/conf/httpd-app.conf and the /installdir/apps/wordpress/conf/htaccess.conf files:

<Directory "...">...RewriteBase /

Page 8: Bitnami WordPress

...</Directory>

And the same in the following lines of wp-config.php:

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');

Don't forget to restart apache after this changes have been done.

How to change the URL to another suburi?

If you want to change the default URL from http://your_domain/wordpress to http://your_domain/myblog, you should follow the stepsbelow:

• Modify /opt/bitnami/apps/wordpress/httpd-prefix.conf

Alias /myblog/ "/installdir/apps/wordpress/htdocs/"Alias /myblog "/installdir/apps/wordpress/htdocs"

(...)

It is also necessary to modify the RewriteBase option to change the"/wordpress" prefix in the /installdir/apps/wordpress/conf/httpd-app.conf and the /installdir/apps/wordpress/conf/htaccess.conf files:

<Directory "...">...RewriteBase /myblog...

</Directory>

And the same in the following lines of wp-config.php:

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/myblog');define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/myblog');

Don't forget to restart apache after this changes have been done.

Page 9: Bitnami WordPress

How to change the WordPress domain name?

If you are using a WordPress version higher than 3.3.1-5 version, youonly have to specify your domain name in the /opt/bitnami/apps/wordpress/htdocs/wp-config.php file (for cloud servers and virtualmachines) and the installdir/apps/wordpress/htdocs/wp-config.php file(for native installers). You can replace the following lines with yourdomain name:

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/wordpress');define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/wordpress');

with

define('WP_SITEURL', 'http://example.com/wordpress');define('WP_HOME', 'http://example.com/wordpress');

If you have previously removed the /wordpress prefix from the URL,do not specify it.

How to create a full backup of WordPress?

Backup

Bitnami stacks are self-contained and the simplest option forperforming a backup is to copy or compress the Bitnami stackinstallation directory. To do so in a safe manner, you will need to stopall servers, so this method may not be appropriate if you have peopleaccessing the application continuously.

Cloud Server

Follow these steps:

• Change to the directory in which you wish to save your backup.

cd /your/directory

• Stop all servers.

$ sudo /opt/bitnami/ctlscript.sh stop

• Create a compressed file with the stack contents.

$ sudo tar -pczvf application-backup.tar.gz /opt/bitnami

Page 10: Bitnami WordPress

• Restart all servers.

$ sudo /opt/bitnami/ctlscript.sh start

You should now download or transfer the application-backup.tar.gzfile to a safe location.

Virtual Machine

Follow these steps:

• Change to the directory in which you wish to save your backup.

cd /your/directory

• Stop all servers.

$ sudo /opt/bitnami/ctlscript.sh stop

• Create a compressed file with the stack contents.

$ sudo tar -pczvf application-backup.tar.gz /opt/bitnami

• Restart all servers.

$ sudo /opt/bitnami/ctlscript.sh start

You should now download or transfer the application-backup.tar.gzfile to a safe location.

Native Installer (Windows)

Follow these steps:

• Stop all servers using the shortcuts in the Start Menu or thegraphical manager tool.

• Create a compressed file with the stack contents. You can use agraphical tool like 7-Zip or WinZip.

• Stop all servers using the shortcuts in the Start Menu or thegraphical manager tool.

You should now download or transfer the application-backup.zip file toa safe location.

Page 11: Bitnami WordPress

Native Installer (Linux and Mac OS X)

Follow these steps:

• Change to the directory in which you wish to save your backup.

cd /your/directory

• Stop all servers.

$ sudo installdir/ctlscript.sh stop

• Create a compressed file with the stack contents.

$ sudo tar -pczvf application-backup.tar.gz installdir

• Restart all servers.

$ sudo installdir/ctlscript.sh start

You should now download or transfer the application-backup.tar.gzfile to a safe location.

Tabs end

Restore

Bitnami stacks are self-contained, so to restore a stack, you only needto uncompress the backup file in the same location. It is important touse the same path that was used when the stack was originallyinstalled.

Cloud Server

Follow these steps:

• Change to the directory containing your backup.

cd /your/directory

• Stop all servers.

$ sudo /opt/bitnami/ctlscript.sh stop

Page 12: Bitnami WordPress

• Rename the current directory to save it.

$ sudo mv /opt/bitnami /opt/bitnamiBackup

• Uncompress the backup file to the original directory.

$ sudo tar -pxzvf application-backup.tar.gz -C /

• Start all servers.

$ sudo /opt/bitnami/ctlscript.sh start

Virtual Machine

Follow these steps:

• Change to the directory containing your backup.

cd /your/directory

• Stop all servers.

$ sudo /opt/bitnami/ctlscript.sh stop

• Rename the current directory to save it.

$ sudo mv /opt/bitnami /opt/bitnamiBackup

• Uncompress the backup file to the original directory.

$ sudo tar -pxzvf application-backup.tar.gz -C /

• Start all servers.

$ sudo /opt/bitnami/ctlscript.sh start

Native Installer (Windows)

Follow these steps:

• Uncompress the backup file to the original directory.• Install services by launching a new command prompt and

executing the following commands. Administrator privileges arerequired.

Page 13: Bitnami WordPress

$ cd installdir$ serviceinstall.bat INSTALL

You can now start or stop servers using the graphical manager tool.

Native Installer (Linux and Mac OS X)

Follow these steps:

• Change to the directory containing your backup.

cd /your/directory

• Stop all servers.

$ sudo /opt/bitnami/ctlscript.sh stop

• Rename the current directory to save it.

$ sudo mv installdir installdirBackup

• Uncompress the backup file to the original directory.

$ sudo tar -pxzvf application-backup.tar.gz -C /

• Start all servers.

$ sudo installdir/ctlscript.sh start

Tabs end

IMPORTANT: When restoring, remember to maintain the originalpermissions for the files and folders. For example, if you originallyinstalled the stack as 'root', make sure that the restored files areowned by 'root'.

If you want to create only a database backup, refer to theseinstructions for MySQL and PostgreSQL.

How to upgrade WordPress?

It is strongly recommended to create a backup before starting theupdate process. If you have important data, create and try to restore abackup to ensure that everything works properly.

Page 14: Bitnami WordPress

There are two different ways to upgrade your application.

• You can upgrade the application and all stack components,such as PHP, Ruby, MySQL and Apache.

◦ Follow these instructions.• You can upgrade the application only without modifying any

other stack components.◦ Use the links provided in the application page on the

wiki.

In the Wordpress case, you can update Wordpress easily from theAdministration panel.

How to install a plugin on WordPress?

You can install any plugin or theme from the Wordpressadministration panel. If you are using the Installer, it is necessary tospecify your FTP credentials. For Virtual Appliances and AMIs FTP ispre-configured and you do not have to specify them.

• If you are using the Native Stack, you can install plugins,themes or updates if you select "development" mode during theinstallation. If you selected "production" mode it is necessary toinstall a FTP server in your machine to be able to installmodules from the admin panel.

Page 15: Bitnami WordPress

How to install all-in-one WP migration plugin?

The following steps assume that:• You are using the Bitnami WordPress Stack (not the

WordPress Multisite Stack) and• You are able to log in to the WordPress dashboard by visiting

http://[your-domain-name]/wp-login.php

1. Log in to your WordPress dashboard.2. Select the "Plugins -> Installed Plugins" option.3. Find the plugin named "All-in-One WP Migration" and select"Activate" to activate it.

image1.png

NOTE: If you are using a version of the Bitnami WordPress Stacklower than v4.0, the "All-in-One WP Migration" plugin is not pre-installed. You must manually install the plugin first following theseinstructions.

The plugin will now be installed. Select the "Site Migration" option inthe WordPress menu to export or import your WordPress blog(instructions).

In some cases, the "Site Migration" page might display the errormessage shown below:

Page 16: Bitnami WordPress

image2.png

In this case, a permissions change is required. Log in to the serverconsole (instructions) and run the commands below before exportingor importing your WordPress blog. Remember that for nativeinstallers, you must replace /opt/bitnami in the commands below withthe path to your WordPress installation directory.

$ sudo chgrp daemon /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/all-in-one-wp-migration/storage$ sudo chmod 775 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/all-in-one-wp-migration/storage

How to install WP-DBManager?

If you install WP-DBManager you will need to create the backup-bd inyour wp-content directory. To do it, you must connect to your machinethrough SSH, and run this command:

mkdir /opt/bitnami/apps/wordpress/htdocs/wp-content/backup-db

Once you have done it, you must add the htaccess example providedby the plugin into the htaccess.conf file and you must create anempty .htaccess file in the backup-db directory to pass the pluginschecks. To do it, run the commands below:

echo '<Directory "/opt/bitnami/apps/wordpress/htdocs/wp-content/backup-db">' >> /opt/bitnami/apps/wordpress/conf/htaccess.confcat /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-dbmanager/htaccess.txt >> /opt/bitnami/apps/wordpress/conf/htaccess.confecho '</Directory>' >> /opt/bitnami/apps/wordpress/conf/htaccess.conftouch /opt/bitnami/apps/wordpress/htdocs/wp-content/backup-db/.htaccess

Page 17: Bitnami WordPress

Finally, once you activated the plugin in your Wordpress dashboard,you must ensure that in the plugin DB Option the mysqland mysqldum paths are correct.

mysql path:

/opt/bitnami/mysql/bin/mysql

mysqldump path:

/opt/bitnami/mysql/bin/mysqldump

How to configure the email settings of WordPress?

You can install or enable the "WP Mail SMTP" from the WordPressadministration page. Once you installed it you can configure theSMTP settings of your email provider in the Settings panel. Forinstance, you can use a GMail account settings to send emails fromthe Wordpress application.

Page 18: Bitnami WordPress

• If you are using the Native Stack or Bitnami Cloud Hosting,you can configure the email settings during the WordPressdeployment.

How to translate WordPress to my language?

Bitnami WordPress has already installed English and Spanishtranslations currently and we will work for adding more languages. Ifyou want to change the Wordpress language, you can follow thesesteps:

1. Download the translation files for your languagefrom http://codex.wordpress.org/WordPress_in_Your_Language

2. Once you have downloaded the files, you have to get the .poand .mo files and copy them into the installdir/apps/wordpress/wp-content/languages folder.

3. Edit the installdir/apps/wordpress/htdocs/wp-config.php file andedit the following line specifying your language code. Forexample: define('WPLANG', 'es_ES');

Page 19: Bitnami WordPress

4. Restart the Apache server and that's all.

How to edit the WordPress files?

For security reasons, WordPress files are not editable from theWordPress application itself. If you are using a Virtual Machine or aCloud Image, we would suggest to use a FTP client to edit the filesremotely.

Another option is to change the permissions to be able to edit fromthe WordPress application temporary. Note that this configuration isnot secure so please revert it after editing the files temporarily:

$ sudo chown daemon:daemon /opt/bitnami/apps/wordpress/htdocs

To revert this change you can run the following command:

$ sudo chown bitnami:daemon /opt/bitnami/apps/wordpress/htdocs

How to enable SSL?

You can see how to configure Apache to enable SSL connections atHow to enable SSL to access through https?

How to debug WordPress errors?

Cloud Server

Once Apache starts, it will create two log files at /opt/bitnami/apache2/logs/access_log and /opt/bitnami/apache2/logs/error_logrespectively. On Amazon Linux and Red Hat Enterprise cloud images,the log files are created at /var/log/httpd/access_log and /var/log/httpd/error_log instead.

• The access_log file is used to track client requests. When aclient requests a document from the server, Apache recordsseveral parameters associated with the request in this file, suchas: the IP address of the client, the document requested, theHTTP status code, and the current time.

• The error_log file is used to record important events. This fileincludes error messages, startup messages, and any othersignificant events in the life cycle of the server. This is the firstplace to look when you run into a problem when using Apache.If no error is found, you will see a message similar to:

Page 20: Bitnami WordPress

Syntax OK/installdir/ctlscript.sh : httpd started

Virtual Machine

Once Apache starts, it will create two log files at /opt/bitnami/apache2/logs/access_log and /opt/bitnami/apache2/logs/error_logrespectively.

• The access_log file is used to track client requests. When aclient requests a document from the server, Apache recordsseveral parameters associated with the request in this file, suchas: the IP address of the client, the document requested, theHTTP status code, and the current time.

• The error_log file is used to record important events. This fileincludes error messages, startup messages, and any othersignificant events in the life cycle of the server. This is the firstplace to look when you run into a problem when using Apache.If no error is found, you will see a message similar to:

Syntax OK/installdir/ctlscript.sh : httpd started

Native Installer

Once Apache starts, it will create two log files at installdir/apache2/logs/access_log and installdir/apache2/logs/error_log respectively.

• The access_log file is used to track client requests. When aclient requests a document from the server, Apache recordsseveral parameters associated with the request in this file, suchas: the IP address of the client, the document requested, theHTTP status code, and the current time.

• The error_log file is used to record important events. This fileincludes error messages, startup messages, and any othersignificant events in the life cycle of the server. This is the firstplace to look when you run into a problem when using Apache.If no error is found, you will see a message similar to:

Syntax OK/installdir/ctlscript.sh : httpd started

Cloud Server

Page 21: Bitnami WordPress

The main MySQL log file is created at /opt/bitnami/mysql/data/mysqld.log.

Virtual Machine

The main MySQL log file is created at /opt/bitnami/mysql/data/mysqld.log.

Native Installer

The main MySQL log file is created at installdir/mysql/data/mysqld.log.

How to reset the WordPress admin password from thecommand line?

It is possible to reset the password from the command line. You canuse the command below to reset the administrator password:

mysql -u root -p -D bitnami_wordpress -e 'UPDATE wp_users SET user_pass=MD5("'NEWPASSWORD'") WHERE ID='1';'

How to increase the allowed size of the uploaded files?

You can modify the following option in the php.ini file to increase theallowed 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

If you have enabled PHP-FPM (enabled by default in Cloud Imagesand VMs) you need to restart PHP-FPM running the followingcommand:

sudo /opt/bitnami/ctlscript.sh restart php-fpm

Note: For native installers replace /opt/bitnami with your currentinstallation directory.

Otherwise, you need to restart the Apache server:

Page 22: Bitnami WordPress

sudo YOUR_INSTALLATION_DIRECTORY/ctlscript.sh restart apache

How to disable the WordPress wp-cron.php?

The wp-cron.php script will run once a user visits your site. If you geta lot of traffic, this could be a problem. This cron task is reallynecessary when you make updates in the blog. You can move this cronscript to a system cron task to help in lowering your resource usageon the server.

Disable the wp-cron in /installdir/apps/wordpress/htdocs/wp-config.php file. It is important the location, you can add it just beforethe database settings.

define('DISABLE_WP_CRON', true);

Then add the cron task process in the system. For example, this crontask will run the wp-cron.php process every hour. You can add it usingthe following command:

$ sudo crontab -u daemon -e0 * * * * cd /opt/bitnami/apps/wordpress/htdocs; /opt/bitnami/php/bin/php -q wp-cron.php

How to install several WordPress modules on the same stack?

It is really easy to install more than one WordPress module on aBitnami stack. You just need to download it from our site(https://bitnami.com/stack/lamp/modules in the case you are usingLinux), and install it using --wordpress_instance_namenewblogname option. Here is an example about the steps in VMs andAMIs (which use Linux as OS).

First of all you have to Download the module, and then run thedownload file with a special parameter.

On GNU/Linux:

chmod a+x bitnami-wordpress-VERSION-module-linux-x64-installer.run./bitnami-wordpress-VERSION-module-linux-x64-installer.run --wordpress_instance_name newblogname

On Windows:

./bitnami-wordpress-VERSION-module-windows-installer.exe --wordpress_instance_name newblogname

On MAC:

Page 23: Bitnami WordPress

hdiutil mount bitnami-wordpress-VERSION-module-osx-x86_64-installer.dmg/Volumes/WordPress\ Module\ VERSION/BitNami\ WordPress\ Module.app/Contents/MacOS/installbuilder.sh --wordpress_instance_name newblogname

Once you have the module installed, you will be able to access itthrough http://YOURDOMAIN/newblogname

In Bitnami Cloud Hosting, the capability to have more than oneWordPress module is enabled. You can do it easily following the stepsin this guide

http://wiki.bitnami.com/Bitnami_Cloud_Hosting/Applications#Adding_several_instances_of_the_same_application

This information is for normal WordPress. If you are looking forinformation about WordPress Multisites, please follow this linkhttp://wiki.bitnami.com/Applications/Bitnami_WordPress_Multisite

How to enable CORS in Wordpress

You just need to edit your WordPress configuration file for Apache(installationdirectory/apps/wordpress/conf/httpd-app.conf) and addthe following line inside the Directory directive

...<Directory installationdirectory/apps/wordpress/htdocs/>...Header set Access-Control-Allow-Origin "*"...</Directory>

You also can also enable other methods or headers for otherdirectories (e.g installationdirectory/apps/wordpress/htdocs/wp-admin):

...<Directory installationdirectory/apps/wordpress/htdocs/wp-admin>...Header set Access-Control-Allow-Origin "*"Header set Access-Control-Allow-Methods "GET, OPTIONS, POST"Header set Access-Control-Allow-Headers "origin, x-requested-with, content-type, accept"...</Directory>

If the request is an OPTIONS request, the script exits with eitheraccess control headers sent, or a 403 response if the origin is not

Page 24: Bitnami WordPress

allowed. By default, only the server where the application is hosted isallowed (see installationdirectory/apps/wordpress/htdocs/wp-includes/http.php) .For other request methods, you will receive a return value.

How to configure WordPress for cloud storage on Amazon S3?

NOTE: Before following the steps in this guide, ensure that you havean Amazon Web Services account with (optionally) an IAM useraccount and the corresponding AWS access key and secret key. Youshould also install and activate the Amazon Web Services plugin andthe Amazon S3 and CloudFront plugin in your WordPress blog(instructions).

To configure Amazon S3 storage for your WordPress blog, followthese steps:

• Log in to your server console.• Open the file /opt/bitnami/apps/wordpress/htdocs/wp-

config.php (for cloud servers and virtual machines) or installdir/apps/wordpress/htdocs/wp-config.php (for native installers) in atext editor and add the following lines to the file, after theinitial <?php PHP tag:

define( 'AWS_ACCESS_KEY_ID', 'XXXX');define( 'AWS_SECRET_ACCESS_KEY', 'XXXX');

Remember to replace the XXXX placeholder in the above lineswith your actual AWS access key and secret key.

wordpress-s3-1.png

Page 25: Bitnami WordPress

• Save the file.

Next:

• Log in to your WordPress blog as an administrator.• Select the "AWS -> S3 and Cloudfront" menu item.• On the resulting page, create a new S3 bucket to store your

WordPress media files by entering a unique bucket name andhitting the "Create" button. You can also choose an existingbucket if you prefer.

wordpress-s3-2.png

• Once the bucket has been created, you'll be transferred to apage where you can configure plugin behaviour. Ensure thatthe "Copy Files to S3" and "Rewrite File URLs" options areturned on. Other settings can be left at their default values ormodified per your preference.

Page 26: Bitnami WordPress

wordpress-s3-3.png

• Click "Save Changes" to save your settings.

You can now add pages and posts to WordPress as normal. When youadd a media file using the WordPress editor or media library, yourmedia file will be uploaded to both the WordPress blog and the chosenS3 bucket.

The Amazon S3 and CloudFront plugin will automatically rewriteURLs so that the media is served from S3 instead of from yourWordPress host. In the screenshot below, refer to the browser statusbar, which shows the S3 bucket URL for the image.

wordpress-s3-4.png

Page 27: Bitnami WordPress

How to transfer the WordPress database to Amazon WebServices?

Refer to this guide for detailed instructions on transferring yourWordPress database to Amazon RDS

Multisite Support

You can now find a Bitnami WordPress Multisite Stack alreadyconfigured at http://bitnami.com/stack/wordpress. If you areusing it, check the configuration guide at /Applications/Bitnami_WordPress_Multisite.

If you are using the standard Bitnami Wordpress Stack check this ifyou want to manually enable multisite feature.