Configure WordPress Update on Ubuntu EC2 instance

EC2 instances uses SFTP and not FTP. Since you do not have a password. The easiest way to configure the WordPress update is via command line. SSH into your instance and enter the following.

sudo chown -R www-data /var/www/wordpress

sudo chmod -R 755 /var/www/wordpress

Add row rerender on a list with input fields looses data

Having a list in your controller that is displayed as input fields either through pageblock or repeat and you need to add another row to the list via a button.  Chances are when you enter data on any input field on any row and you hit Add Row button that has a rerender attribute that makes the ajax call, the previous entered data will be lost as per code sample below.

public class MyController {
public list<myOject__c> objList {get;set;}
public MyController() {
objList = new List<myObject__c>();
public void addRow(){
myObject__c newObj = new myObject__c();
<apex:pageblock id=”myList”>
<apex:pageblockSection value=”{!objList}” var=”obj”>
<apex:inputField value=”{!obj.Name” />
<apex:commandButton value=”Add Row” action=”{!addRow}” rerender=”myList”/>
The simple solution is to add the attribute immediate=”false” to the commandButton tag. This forces the data to be retained.