Skip to content
Switch branches/tags

Latest commit



Failed to load latest commit information.
Latest commit message
Commit time
Feb 11, 2021

WordPress for Android


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

  1. Make sure you've installed Android Studio.
  2. Install npm using Node Version Manager(nvm), as described in step one from the Block Editor Quickstart guide
  3. cd WordPress-Android to enter the working directory.
  4. cp to set up the sample app credentials file.
  5. In Android Studio, open the project from the local repository. This will auto-generate with the SDK location.
  6. Recommended: The CI uses JDK11 to build the app and run the tests. Some tests won't pass on the JDK embedded in Android Studio (JDK8). You might want to set JAVA_HOME and JDK location in Android Studio to JDK11.
  7. Go to Tools → AVD Manager and create an emulated device.
  8. Run.


  • To use features (login to, access Reader and Stats, etc) you need a OAuth2 ID and secret. Please read the OAuth2 Authentication section.
  • While loading/building the app in Android Studio ignore the prompt to update the gradle plugin version as that will probably introduce build errors. On the other hand, feel free to update if you are planning to work on ensuring the compatibility of the newer version.

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 ./ 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. Note that authenticating to via Google is not supported in development builds of the app, only in the official release.

Note that credentials created with our applications manager allow login only and not signup. New accounts must be created using the official app or on the web. Login is restricted to the account with which the credentials were created. In other words, if the credentials were created with, you will only be able to login with Using another account like will cause the Client cannot use "password" grant_type error.

For security reasons, some account-related actions aren't supported for development builds when using a account with 2-factor authentication enabled.

Read more about OAuth2 and the REST endpoint.

Build and Test

To build, install, and test the project from the command line:

$ ./gradlew assembleWordPressVanillaDebug                        # assemble the debug .apk
$ ./gradlew installWordPressVanillaDebug                         # install the debug .apk if you have an
                                                                 # emulator or an Android device connected
$ ./gradlew :WordPress:testWordPressVanillaDebugUnitTest         # assemble, install and run unit tests
$ ./gradlew :WordPress:connectedWordPressVanillaDebugAndroidTest # assemble, install and run Android tests

Directory structure

├── libs                    # dependencies used to build debug variants
├── tools                   # script collection
├──       # properties imported by the build script
├── WordPress
│   |-- build.gradle        # main build script
│   └── src
│       ├── androidTest     # Android test assets, resources and code
│       ├── test            # Unit tests
│       ├── main
│       │   ├── assets      # main project assets
│       │   ├── java        # main project java code
│       │   └── res         # main project resources
│       ├── debug           # debug variant
│       └── wasabi          # wasabi variant specific resources and manifest

Google Configuration

Google Sign-In is only available for accounts through the official app. Contributors can build and run the app without issue, but Google Sign-In will always fail. Google Sign-In requires configuration files which contain client and server information that can't be shared publicly. More documentation and guides can be found on the Google Identity Platform website.


Read our Contributing Guide to learn about reporting issues, contributing code, and more ways to contribute.


If you happen to find a security vulnerability, we would appreciate you letting us know at and allowing us to respond before disclosing the issue publicly.

Getting in Touch

If you have questions or just want to say hi, join the WordPress Slack and drop a message on the #mobile channel.


Please read the docs for more.



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.