<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0306</schemaVersion>

    <documentType>5</documentType>

    <periodOfReport>2013-12-31</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <form3HoldingsReported>0</form3HoldingsReported>

    <form4TransactionsReported>0</form4TransactionsReported>

    <issuer>
        <issuerCik>0000921547</issuerCik>
        <issuerName>HERITAGE OAKS BANCORP</issuerName>
        <issuerTradingSymbol>HEOP</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001441854</rptOwnerCik>
            <rptOwnerName>Raver William R</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1222 VINE STREET</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>PASO ROBLES</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>93446</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>EVP, General Counsel</officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionCoding>
                <transactionFormType></transactionFormType>
            </transactionCoding>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>9840</value>
                    <footnoteId id="F1"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable></derivativeTable>

    <footnotes>
        <footnote id="F1">This Form 5 is filed to correct the last reported aggregate total of securities beneficially owned.</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>Traci Robichaud, Attorney in Fact for William Raver.</signatureName>
        <signatureDate>2014-02-13</signatureDate>
    </ownerSignature>
</ownershipDocument>
