Stage Wordpress Locally

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Stage Wordpress Locally

Postby andrestone » December 12th, 2018, 5:03 pm

Hello There,

I'm new to PHPSense and pretty new to web devlopment as well.

Basically, what I need to understand is what exactly PHPSense provides, in order to know what steps I need do to perform a full copy of a currently working wordpress deployment to develop it locally.

In other words, I want to be able to replicate the existing wordpress installation with all its dependencies into a local environment so I can start developing from its current stage, and in order to do so, I need to know in what ways PHPSense would fit in this process.

Do I have to prepare full environment (apache, php, mysql, etc) and manually copy database and files?
Posts: 1
Joined: December 12th, 2018, 4:56 pm

Re: Stage Wordpress Locally

Postby mhpcc » December 12th, 2018, 7:26 pm

The default that php tools installs is an installation of php on iis express. You can do a manual installation of php for IIS with Microsofts Web Platform Installer. You can also use apache or nginx or any other webserver that you want.

As for setting your project up locally, it depends on the OS you're using. First copy all the source contents into a project folder, of course. Assuming Windows there's not terribly much you have left to do then - just configure the web page in IIS manager and you're good to go. In Mac OS X you'll have to mess with file permissions, owners a bit, configure vhosts for Apache and all that stuff - you can find tutorials for that online. To continue developing, install the database you're using, get all the data you need.

PHP Tools for Visual Studio provides you an integrated development environment. You can change source code, publish that to the web server root, debug your code, use all the nice keyboard shortcuts and functionality that you know from VS. All you really have to configure in Visual Studio is your local php installation (for composer - use a 64 bit version of php!), the web server root and your local project root to create file mappings for remote debugging. The web server URL if you want to start debugging sessions right out of visual studio, but that's not terribly important. To debug, I can recommend you the Xdebug Helper extension for Firefox/Chrome, to just enable/disable debugging on the fly (you can leave VS listening and only debug when you set it on in the browser). To install xdebug, PHP Tools for VS automatically checks your php ini to see if it's set up correctly. You find xdebug installation tutorials on google anyhow.

Good luck.

Edit: Try to use the same web server for development as you will in production. It makes your life easier with .htacces files and such. I personally develop on windows, but my web server is running on a virualized RHEL system. Files are synced by either VS's publish feature (though, check a couple topics under this one, remove all the vendor stuff or it will cripple your performance) or WinSCP. Performance of PHP also seems to be a lot better on linux based systems compared to windows, as least when using apache on each.
Posts: 22
Joined: October 19th, 2018, 10:46 pm

Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 4 guests


User Control Panel


Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 151 on December 6th, 2020, 7:46 am

Users browsing this forum: No registered users and 4 guests