Additional menu

Get MemberPress today! Start getting paid for the content you create! Get MemberPress Now
  1. Home
  2. Knowledge Base
  3. FAQs
  4. How To
  5. How to Override MemberPress Template Files?

How to Override MemberPress Template Files?

MemberPress uses template files to control how various elements of your membership site appear. This includes the designs of MemberPress pages, forms, emails, courses, and other add-on-related pages. You might want to customize these designs to match your website's design better. In this case, you must override MemberPress template files.

This guide explains how to safely override MemberPress template files and where to find the templates you need.

Why Override MemberPress Templates?

The default MemberPress templates control the appearance of important pages like:

  • Registration pages
  • Account pages
  • Pricing pages
  • Thank you pages
  • Login pages

By overriding these templates, you can:

  • Match the design to your brand
  • Add custom elements to specific pages
  • Change the layout of membership components
  • Fix display issues on your site

Override MemberPress Template Files

What You Need Before Starting

To customize MemberPress templates, you need:

  • MemberPress installed and activated on your WordPress site;
  • Access to your website files through FTP or a file manager;
  • A child theme (strongly recommended) to store your modified templates.

Child Theme And Custom Templates Folder

Before creating any custom template files, you must create a folder in your child theme named “memberpress“. You should place all your custom template files related to MemberPress and MemberPress add-ons in this folder.

To create the folder structure for the custom templates folder, follow these steps:

  1. Access your website files through an FTP client (e.g. Filezilla) or a file manager plugin (e.g. File Manager). If available, you can also use the file manager provided by your hosting service.
  2. Go to your child theme folder (usually in wp-content/themes/your-child-theme-name).
  3. Add the folder named memberpress to this folder.

Accordingly, your folder path should be /wp-content/themes/your-child-theme/memberpress/ path. The your-child-theme part in the mentioned folder structure needs to match the name of your child theme folder.

Note: The custom template files and the related folder structure need to be added to the child theme of your WordPress theme. If you edit files directly or add custom files to your active theme, all changes will be deleted with every update of the MemberPress plugin or the theme.

Finding the Original Template Files

First, you should locate the template files for the designs you want to customize:

  1. Connect to your website using FTP or a file manager through your hosting account.
  2. Navigate to the wp-content/plugins/memberpress/app/views/ folder.
  3. Browse through this folder to find the templates you want to customize. The locations of the most common templates under this folder include:
    • /checkout/form.php – the registration page;
    • /checkout/payment_form.php – the checkout page;
    • /checkout/spc_form.php – the single page checkout (if enabled);
    • /account/ – all account page templates. The MemberPress account uses multiple templates to control different account elements. Thus, under this folder, you will find the following files:
      • home.php – the Home tab;
      • subscriptions.php – the Subscriptions tab;
      • payments.php – the Transactions tab;
      • nav.php – account menu items;
      • password.php – password reset page on the account page;
    • /readylaunch/ – all ReadyLaunch template files (if using ReadyLaunch™).
    • /login/form.php – the login page;
    • /login/forgot_password.php – the password reset page on the login page;

When copying these files, remember to keep the original folder structure.

To illustrate, when copying the Registration page template file, you must create the checkout folder under the /wp-content/plugins/memberpress/app/views/ folder. Then you can add the form.php file to it.

Creating Custom Template Files

To modify any template file, copy the original template file to the custom templates folder. You should do this only for the template files you need to modify.

Tip: You shouldn't copy the entire contents of the /wp-content/plugins/memberpress/app/views/ folder to the custom templates folder. Since templates change over time, copying only the files you need to modify will ensure that other (unmodified) templates are always up to date. This will limit the chance of conflicts with future upgrades to MemberPress.

To override MemberPress template files properly, you must ensure the following:

  • The custom template file names must match the names of the original files;
  • Copy the folder structure after the /views folder, together with the template file.

Adding the template files to your child theme this way will automatically override MemberPress template files. Now, you can apply all modifications to the file you copied.

Example: Overriding the Account Page Template

Let's say you want to customize the Home page on the MemberPress account. The steps would be as follows:

  1. Find the original template at wp-content/plugins/memberpress/app/views/account/home.php.
  2. Navigate to the /memberpress folder in your child theme (wp-content/themes/your-child-theme-name/memberpress)
  3. Create the account folder (if it is not already present) to match the original file folder structure.
  4. Copy the home.php file to your new folder.
  5. Edit the file to make your design changes.
  6. Save the file.

Note: Templates can change over time. After each MemberPress update, you should check each custom template for any incompatibilities to ensure it continues to function correctly.

Override MemberPress Email Templates

MemberPress emails are located in the /emails folder. Please note that template files for emails sent to administrators (Admin Emails & Notices) use the admin_ prefix. Templates for emails sent to users (Member Notices) have the user_ prefix.

Note: The /emails folder contains template files for the emails listed under Dashboard > MemberPress > Settings > Emails tab.

When you override MemberPress email templates, you need to take an extra step after creating the custom template:

  1. Navigate to Dashboard > MemberPress > Settings > Emails tab.
  2. Find the email whose template file you have overridden.
  3. Click the Reset Defaults button on that line to load your new template.

Override MemberPress Add-On Template Files

MemberPress add-ons are separate plugins that need to be installed and activated on your website to use them with MemberPress. Accordingly, addon-related templates are located in different folders

You can also override templates for MemberPress add-ons using the same approach. Thus, copy the original add-on template files you wish to override to the /wp-content/themes/your-child-theme/memberpress/ folder.

The template files for each MemberPress add-on are located in the add-on-specific folders, each containing the app/views/ folder structure. When copying these files, you must also copy the folder structure after the /views folder.

Below are examples of how to properly place the custom template files for different MemberPress add-ons.

MemberPress Corporate Accounts

  • Original template files are located in: /wp-content/plugins/memberpress-corporate/app/views/
  • Example:
    • Original file to override: mpca-manage-account-template.php (Manage Sub-Accounts Page)
    • Original file location: /wp-content/plugins/memberpress-corporate/app/views/
    • Custom templates should be placed in: /wp-content/themes/your-child-theme/memberpress/mpca-manage-account-template.php

MemberPress Courses

  • Original templates are located in: /wp-content/plugins/memberpress-courses/app/views/
  • Example:
    • Original file to override: courses_list.php (Account Courses List)
    • Original file location: /wp-content/plugins/memberpress-courses/app/views/account/
    • Custom templates should be placed in: /wp-content/themes/your-child-theme/memberpress/account/

On the other hand, if you enable the ReadyLaunch™ Courses/Lessons template, the original template files are located in: /wp-content/plugins/memberpress-courses/app/views/classroom/

  • ReadyLaunch™ Example:
    • Original file to override: courses_header.php (ReadyLaunch Course Header)
    • Original file location: /wp-content/plugins/memberpress-courses/app/views/classroom/
    • Custom templates should be placed in: /wp-content/themes/your-child-theme/memberpress/classroom/courses_header.php

PDF Invoices

  • Original templates are located in: /wp-content/plugins/memberpress-pdf-invoice/app/views/account/invoice/
  • Example:
    • Original file to override: simple.php or modern.php (Simple or Modern Invoice)
    • Original file location: /wp-content/plugins/memberpress-pdf-invoice/app/views/account/invoice/
    • Custom templates should be placed in: /wp-content/themes/your-child-theme/memberpress/account/invoice/

Most Commonly Used Addon-Related Templates

MemberPress add-ons are separate plugins that need to be installed and activated on your website to use them with MemberPress. Accordingly, addon-related templates are located in different folders:

  • PDF Invoices: the simple.php OR modern.php file under the /wp-content/plugins/memberpress-pdf-invoice/app/views/account/invoice folder;
  • Corporate Accounts: separate files for sub-account and corporate account templates located under /wp-content/plugins/memberpress-corporate/app/views/ folder:
    • Manage Sub-accounts page: mpca-manage-account-template.php
    • Corporate Accounts section on Edit profile page: mpca-edit-user-template.php
  • ReadyLaunch™ Courses: MemberPress courses use multiple template files, all located under the /wp-content/plugins/memberpress-courses/app/views/ folder:
    • Courses tab on Account page: the courses_list.php file under the /account/courses_list.php folder;
    • Courses page: the courses_archive_course.php file under the /classroom/courses_archive_course.php folder;
    • Course page: the courses_single_course.php file under the /classroom/courses_single_course.php folder;
    • Course sidebar: the courses_sidebar.php file under the /classroom/courses_sidebar.php folder;
    • Lesson page: the courses_single_lesson.php file under the /classroom/courses_single_lesson.php folder;
    • Certificates: the courses_certificate.php file under the /courses/courses_certificate.php folder.

Troubleshooting Template Overrides

If your custom templates aren't working:

  1. Check folder structure: Verify that your folder structure exactly matches the required path after the /app/views/ folder.
  2. Verify file names: Make sure your custom template names match the original files exactly.
  3. Clear cache: Clear any caching plugins you have installed on your website, as cached pages might show the old template. This also applies to server-side or CDN caching, if present.
  4. Check for conflicts: Try deactivating other plugins temporarily to check for conflicts.
  5. File permissions: Ensure your custom template files have the proper permissions (usually 644).

Override MemberPress Styles Using CSS

Consider using your theme's custom CSS option instead of modifying template files for minor style changes. This approach is often more straightforward for minor design adjustments.

If you need to change CSS, the best way to do that currently is to use a CSS manager plugin (e.g. Custom CSS Manager) to add your own custom styles.

Tip: In case your custom CSS is not overriding MemberPress' default style, you can try to add the !important declaration. This declaration should be added in front of each item you want to modify using CSS.

Was this article helpful?

Related Articles

computer girl

Get MemberPress today!

Start getting paid for the content you create.