Title: Creating a WordPress Page using PHP code
Last modified: August 19, 2016

---

# Creating a WordPress Page using PHP code

 *  [joeynoh](https://wordpress.org/support/users/joeynoh/)
 * (@joeynoh)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/creating-a-wordpress-page-using-php-code/)
 * Hi,
 * I have created a page that people can use to sign up to become part of my blog
   with their own custom page. The form values will be put in a database and pulled
   again on a custom page that would be created for them. I want that page to be
   created automatically, but i dont want it to be just a file, but rather an actual
   WordPress page.
 * So would anyone know if that is possible? If so what would the php code for that
   be?
 * And for my 2nd question; I want to place a custon php file in my theme directory,
   but of course when i go to mydomain.com/mypage.php i get a 404 error. So my question
   would be is what am i supposed to include on my page? or how can i make it as
   much of a part of the theme as lets say the page.php.
 * Thanks in advance,
    Joey

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/creating-a-wordpress-page-using-php-code/#post-1500099)
 * [http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates](http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates)
 *  Thread Starter [joeynoh](https://wordpress.org/support/users/joeynoh/)
 * (@joeynoh)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/creating-a-wordpress-page-using-php-code/#post-1500115)
 * Yes, I know how to create my own template. But Want I want to know is how to 
   create a custom wordpress page with PHP Code. The same way as how i would create
   one in the control panel and click on publish.
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/creating-a-wordpress-page-using-php-code/#post-1500126)
 * create the page template – upload it
    choose that template from the template 
   drop down when writing a page you have a custom wordpress page then
 *  Thread Starter [joeynoh](https://wordpress.org/support/users/joeynoh/)
 * (@joeynoh)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/creating-a-wordpress-page-using-php-code/#post-1500274)
 * Yes, i know.. As I have mentioned before, but maybe i should have been more clear.
   I want the PHP code to create the page, not me. A button that is clicked on my
   custom page, will create (on its own, through code) a wordpress page with the
   given parameters.
 * So no one would have to login into the control panel for this.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Creating a WordPress Page using PHP code’ is closed to new replies.

 * 4 replies
 * 2 participants
 * Last reply from: [joeynoh](https://wordpress.org/support/users/joeynoh/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/creating-a-wordpress-page-using-php-code/#post-1500274)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
