Pin Me

How to Upload Custom Pages to WordPress

written by: Nicholas•edited by: Michele McDonough•updated: 5/25/2011

Aside from uploading the default page template that comes bundled in your theme, you may also want to upload specific pages to your WordPress blog. This is a very simple thing to do. This tutorial will teach you how to upload pages, and how to edit them so that they appear in your WordPress editor.

  • slide 1 of 6

    FTP Clients

    FileZilla Before you can learn how to upload custom pages to WordPress, you need to have a tool for uploading. If you have installed a custom theme (a theme that does not come with WordPress), than you already have an FTP client program. For those who don't yet have an FTP client program, you can find free FTP clients by doing a basic search. To save you some work, you may want to go with FileZilla, as it is one of the easiest to use and most capable free FTP clients. FileZilla will work for all three major operating systems: Windows, Mac, and Linux.

    Upon downloading, make sure that you install FileZilla (or other FTP) so that it's ready to use.

  • slide 2 of 6

    Creating a Custom Page

    If you already have a custom page ready for uploading you can skip this step. However, you may want to follow if you don't know how to create your own custom pages, as this can be a useful skill to have in the future.

    If you have a HTML editing program such as Microsoft Expression Web or Adobe Dreamweaver installed on your computer, open that now. If you do not, you can use the built-in Windows Notepad program. If you are using a Mac you can use the built-in TextEdit program.

    Either way, open up your text editing program and insert the following piece of code at the very top of the document:

    <?php /* Template Name: Your Template Name Goes Here */ ?>

    <html> Your HTML Code Here

    </html>

    The section that says "Your Template Name Goes Here" can be changed to whatever you would like to call your page. For example, if you are creating a custom About page, you may want to use Template Name: About Page.

    The section that says "Your HTML Code Here" will display the HTML for your page. If you choose to leave this blank, you will have a completely blank custom page. Although you are going to be doing some custom coding, you still probably want to have your theme's header on that custom page. Using that as an example, we can insert a header call between the two HTML tags. This would give you something like this:

    <?php /* Template Name: Your Template Name Goes Here */ ?>

    <html>

    <?php get_header(); ?>

    </html>

    Now, you don't have to enter all of your HTML information right now. We will be uploading this page so that we can edit it directly within WordPress.

    After you are done coding your custom page, you need to save it. It is very important that you save this page as a PHP file. Thus, you need to end the filename with the .php extension. For this example, we would save the page as About.php

  • slide 3 of 6

    Uploading

    Now it's time to open up your FTP client program (FileZilla). After that is complete, you will need to login to your site. For this, you will need to enter your site's URL and the password. You would have created the password when you set up your hosting account or set up WordPress. Enter in your site's URL. For example, www.brightwordpress.com, enter the password, and connect using the FTP program.

    Upon connection, you should see a list of all of your site's files. You need to find the root directory. Most likely it will be a folder labeled Public_HTML. If not, you may already be in the root directory. Look for a folder labeled wp-content. Open up this folder and look for a sub folder named themes. Open it. Here, you will need to select the specific theme that you want to use the custom page with. Open up the theme folder.

    Now, simply drag and drop your custom page PHP file into your FTP client to upload.

  • slide 4 of 6

    Activating

    By now, you have completed the tutorial and you should have uploaded a custom page to WordPress. From here, you need to activate the page to see if it works. Login to your actual WordPress Admin page which should be something like:

    www.yourwordpresssite.com/admin

    After you have logged in, go create a new post and title it something like "My Custom Page Demo". From the actual page that you type in a title for the post and post content, you will see a page templates section located along the right hand side. Click the drop down arrow and select your custom page PHP. It will be labeled as whatever you titled it (see page 1). From there, type some test text into the post body section and publish your page. View your page.

    That's all there is to that. You should now see your custom page on your site, ready to use within WordPress.

  • slide 5 of 6

    Editing

    On page 1 of this tutorial, it was mentioned that you would be able to edit this custom page template directly in WordPress. Click the Editor link from your WordPress Admin page. It should be located under the Appearance section. On the right hand side of the screen, you will see several files that your theme uses. The new custom page that we created will now be listed with the rest of your theme's files. Simply click once to select it, and from there you can edit it or make any changes that you'd like.

    That's all there is to it. Upon following this tuturoial, you should now know how to create and use your own custom WordPress pages.

     

  • slide 6 of 6