• I do my own work website and am switching from html to WordPress and have a couple of questions.

    1. If I wanted a major update to a page, eg stuff.php, I would create stuff2.php until I was happy, then just rename it to stuff.php and upload it to overwrite to the old . What’s the best practice for doing this in WordPress?
    2. I have a bunch of PHP scripts that do server stuff, nothing to do with my website. I keep them in a folder, eg myphpstuff. Where should I keep this folder, in the root alongside the WordPress fodlers or somewhere within the WordPress folders?

Viewing 7 replies - 1 through 7 (of 7 total)
  • 1. The best practice way to do this sort of thing is a local development environment and version control. That can be a bit daunting, and if you don’t feel up for it I guess what you’re suggesting will work.
    2. I’d consider putting WordPress and your PHP stuff in their own folders in the root, and running WordPress from its own directory with this method.

    You are assuming that a WordPress site is the same as an HTML site.

    There is no stuff.php. WordPress is a php driven web application that serves your content from a database to template files rendered in the browser.

    So there are no php “pages” like your html pages.

    There is a backend that you log into and create your content. The content is then stored in the database and sent to a template file when the page is accessed.

    So essentially a WordPress theme could only have 1 php file called index.php and all the content is rendered in that template file.

    You can create as many pages as you want in the back end “stuff, stuff2, stuff3, contact-us…”

    But there is no php or html file associated with the content. The content is just data in the database.

    SO….

    Yes, you can create a page called stuff2 in the backend and save it in draft mode until you are ready to publish it.

    As far as your custom scripts, if they do not interact with the website they need to be stored in a folder outsite of WordPress. If they do interact with the site you will need a developer to include them in the theme you choose.

    A theme is a collection of php page templates and CSS that define what layout the data from the database is displayed in.

    I think @jakept may have misunderstood your question…

    Thread Starter markhad

    (@markhad)

    Thank you both for taking the time. I take you points re there not being any pages as such. I just wanted to know how to make more than minor changes without it being public. My pages run php scritps and I can’t see how to test those without them being published pages. Can I create a unlinked page then overwrite the origianl when tested or am I simply going the wrong way about it?

    • This reply was modified 7 years, 1 month ago by markhad.

    You can create pages and test them from the backend without publishing them.
    OR
    You can publish pages but not add them to the menu. You can test with their url.

    I usually develop locally then push the changes to live site…

    Thread Starter markhad

    (@markhad)

    Ok, thanks. But if I want to keep the old version live, and work on an updated version as above, how to then I switch from the old version to the new version?

    You will copy the content of the draft version and paste into live page. Once you name a page you can not name another page the same name so you will have to copy/paste the new content to replace old content.

    Thread Starter markhad

    (@markhad)

    Ok, thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Basic questions re starting with WordPress’ is closed to new replies.