How do I test PHP files in WordPress?

I’ve downloaded a WordPress theme, but I want to edit it before uploading it to my live server. I read I need to run a server in order to test the PHP files, but I don’t know what to use in order to do so. Or would it just be better to upload then edit it?

Related posts

1 comment

  1. The WordPress Codex documentation on Installing WordPress and Editing Files give you pretty much all information you need.

    You will need a web server to test the code and changes. So you can either do this on your web server (assuming you have some sort of hosting package, because you mention ‘upload’), or on your local machine. For easy setup, there is XAMPP or WampServer on Windows, or MAMP for Macs and LAMP for Linux based machines (and many, many more).

    Basically, there is no right or wrong way to do this, as long as it works for you. Some people will never edit a single file on a live website, simply because they fear things will break on the live website version. That’s why they always test changes on a local web server (using one of the previously mentioned packages). But if you’re only making small changes in CSS for example and just starting out, there is no harm in experimenting a bit in the live install. 🙂

    Good rule of thumb: Make backups before you do anything, so if you run into any trouble, you always have a backup of the original files to restore.

Comments are closed.