PHP:Wordpress测试页面

The problem!

I have a Wordpress site up and running. I wanted to add a custom page, for example if I browse to site.com/mytest it would display just Hello world without any css etc.

What I've tried

I added a mytest.php file under var/www/wp-content/ and tried to browse to it. (The code simply echo a static text).

What I got was simply a 404 page by Wordpress.

To view the file you uploaded, browse: site.com/wp-content/mytest.php

If you just type site.com/mytest , wordpress will thin you are reffering to a page stored in the wp-database. Since it's not you cant view it.

To add the page in the menu, use custom menu and add as "Custom link".

You can make your page a wp custom page template by adding this at the top:

/*
Template Name:Your Page Name
*/

Then create a page in the wordpress dashboard pages and select your page template from the page template dropdown.