Clone this repo:
  1. e378008 Merge remote-tracking branch 'origin/upstream-master' into master by Chris Warrington · 7 years ago main master mirror-goog-studio-master-dev studio-master-dev gradle_2.3.0 gradle_3.0.0 gradle_3.1.2 gradle_3.4.0 studio-2.3 studio-3.0 studio-3.1.2 studio-3.2.1 studio-3.4.0
  2. 7e05eb7 Initial empty repository by kuantung · 7 years ago
  3. 025b8b2 Merge remote-tracking branch 'origin/release/6.0' by Maxime Biais · 7 years ago upstream-master
  4. 70fd1e1 Merge pull request #4604 from wordpress-mobile/fix/role-info-url-untranslatable by Maxime Biais · 7 years ago
  5. 88f4b09 Mark role_info_url as untranslatable by Stefanos Togkoulidis · 7 years ago

WordPress for Android

Build Status

If you‘re just looking to install WordPress for Android, you can find it on Google Play. If you’re a developer wanting to contribute, read on.

Build Instructions

You first need to generate the (replace YOUR_SDK_DIR with your actual android SDK directory) file and create the file:

$ echo "sdk.dir=YOUR_SDK_DIR" >
$ cp ./WordPress/ ./WordPress/

Note: this is the default ./WordPress/ file. If you want to use features (login to a account, access the Reader and Stats for example), you'll have to get a OAuth2 ID and secret. Please read the OAuth2 Authentication section.

You can now build, install and test the project:

$ ./gradlew assembleVanillaDebug # assemble the debug .apk
$ ./gradlew installVanillaDebug  # install the debug .apk if you have an
                                 # emulator or an Android device connected
$ ./gradlew cAT                  # assemble, install and run unit tests

You can use Android Studio by importing the project as a Gradle project.

Directory structure

|-- libs                    # dependencies used to build debug variants
|-- tools                   # script collection
`-- WordPress
    |-- build.gradle        # main build script
    |--   # properties imported by the build script
    `-- src                 # android specific Java code
        |-- androidTest     # test assets, resources and code
        |-- main            #
        |   |-- assets      # main project assets
        |   |-- java        # main project java code
        |   `-- res         # main project resources
        |-- vanilla         # vanilla variant specific manifest
        `-- wasabi          # wasabi variant specific resources and manifest

OAuth2 Authentication

In order to use functions you will need a client ID and a client secret key. These details will be used to authenticate your application and verify that the API calls being made are valid. You can create an application or view details for your existing applications with our applications manager.

When creating your application, you should select “Native client” for the application type. The applications manager currently requires a “redirect URL”, but this isn't used for mobile apps. Just use “https://localhost”.

Once you‘ve created your application in the applications manager, you’ll need to edit the ./WordPress/ file and change the WP.OAUTH.APP.ID and WP.OAUTH.APP.SECRET fields. Then you can compile and run the app on a device or an emulator and try to login with a account.

Read more about OAuth2 and the REST endpoint.

How we work

You can read more about Code Style Guidelines we adopted, and how we're organizing branches in our repository in the Contribution Guide.

Need help to build or hack?

Say hello on our Slack channel: #mobile.


  • Q: I can't build/test/package the project because of a PermGen space error.
  • A: Create a file in the project root directory with the following: org.gradle.jvmargs=-XX:MaxPermSize=1024m.


WordPress for Android is an Open Source project covered by the GNU General Public License version 2. Note: code in the libs/ directory comes from external libraries, which might be covered by a different license compatible with the GPLv2.