How to create a Template in WordPress without FTP Access

- 1 min read

You want to create a Template in your theme, and somehow you don’t have FTP access in that moment. But, hey, you have the WordPress logins to enter in the backend, so… stay tuned!

1 Indentify the theme directory

To know the directory in which the theme is located, you will need to see the source code in the homepage of your website and search “/wp-content/themes/“. The search will show you the full path to your theme, would be something like “https://example.com/wp-content/themes/YOUR_THEME/style.css” or whatever.

We only need to copy “/wp-content/themes/YOUR_THEME/” to the clipboard.

2 Create the File

In your WordPress backend, go to Appearance > Editor, open “header.php” and paste the following code into it:

<?php touch('wp-content/themes/YOUR_THEME/tpl-template.php'); ?>

Of course, you need to modify the path with your specific needs.

Now, go to your homepage and go back to the backend to delete the line you just wrote.

3 Edit the File

Like magic, the file now will appear in the right side of the editor. So now you can edit it to create a new and fresh template!


Share: Link copied to clipboard

Tags:

Previous: There is a datacenter that runs on lake water
Next: Basic flexbox structure

Where: Home > Technical > How to create a Template in WordPress without FTP Access