To install Wordfence in WordPress, follow these steps: 1) Login to your WordPress admin dashboard, 2) Go to the “Plugins” section and click “Add New”, 3) Search for “Wordfence” in the search bar, 4) Click “Install Now” next to the Wordfence plugin, 5) Once the installation is complete, click “Activate” to activate the plugin, 6) Configure the settings according to your preferences, and 7) Save the changes to apply the settings.