• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Convert DW html pages to PHP in Dreamweaver CS4

New Here ,
Nov 20, 2012 Nov 20, 2012

Copy link to clipboard

Copied

Created web pages in DWCS4 in html but discovered because I need some form pages to interact with MySQL that I should have created pages using DW PHP format. Is there a simple way to convert all html pages to php using dreamweaver CS4? OS is Win XP. Have access to hosting company with MySQL, PHP,PHPAdmin.

TOPICS
Server side applications

Views

6.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 20, 2012 Nov 20, 2012

Copy link to clipboard

Copied

All you have to do is change the .html extension to .php from within the Files tab for those pages with actual php code in them.

That's it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2012 Nov 21, 2012

Copy link to clipboard

Copied

File > SaveAs >filename.php. 

Don't forget to delete filename.html pages from your local and remote sites.

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2012 Nov 21, 2012

Copy link to clipboard

Copied

I would recommend against Nancy's suggestion here (and it's REALLY weird to see myself typing that).

I say it only because you are working within an existing site that likely already has links going to the .html file you are changing.

If you do a Save As and create a new .php file based on the still existing .html file, you will need to manually change the links on the pages that are currently pointing to the that .html file so they will point to the new .php file. You would need to either open the pages individually and fix the links, or use DW's Find & Replace feature and do a site-wide correction.

However, if you change the file extension from within the Files tab instead, DW will  update any pages that link to it automatically.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2012 Nov 21, 2012

Copy link to clipboard

Copied

LATEST

Good call, Jon.

To keep links intact, using the Files panel & F2 to rename each one is safer. 

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines