You can override register.phtml file using layout XML way or directly add template file to theme level by theme module.
register.phtml file used to display a Customer registration form in frontend.
Block name is customer_form_register which contains the register.phtml template.
you can see registration form by URL, <SITE_URL>/customer/account/create
Magento Opensource Template Location:
In Opensource, register.phtml file coming from Magento_Customer module.
Magento Commerce|Cloud Template Location:
In Commerce/Cloud Version, register.phtml file coming from Magento_CustomerCustomAttributes module.
You can override using Layout XML inside a module by <referenceBlock> node inside your customer_account_create.xml file.
Create a XML file, app/code/<Rbj/Modulename>/view/frontend/layout/customer_account_create.xml
In above path, <Rbj/Modulename> replace with your Package/Modulename.
<?xml version="1.0"?> <!-- /** * @author Rakesh Jesadiya * @package Rbj_Modulename */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="customer_form_register"> <action method="setTemplate"> <argument name="template" xsi:type="string">Rbj_Modulename::form/register.phtml</argument> </action> </referenceBlock> </body> </page>
Create a template file at location,
app/code/<Rbj/Modulename>/frontend/templates/form/register.phtml
Clear a cache and check your registration page.