I am building a WordPress website in Dreamweaver CS5 and am also using MAMP for my PHP/MySQL needs.
The problem is that when I create a new WordPress site in Dreamweaver (I have an existing WordPress template), and I open the index.php file, it asks me if I want to discover any other files that are dynamically related to the index.php file. I click “Discover”, then I get this error: “Dynamically-related files could not be resolved because of an internal server error.”
My MAMP document root is: /Users/Burton/Sites/
In the document root I have a sub-directory called WordPress where all the WordPress files (including my theme) are stored
In Dreamweaver I created a new site and here are the settings for it and the server:
Site Name: Test Site
Local Site Folder: /Users/Burton/Sites
Server Name: Local Testing
Connect Using: Local/Network
Server Folder: /Users/Burton/Sites
Web URL: http://localhost:8888/Wordpress
Server Model: PHP MySQL
Testing: On (Make it a test server)
Going to the site via a web browser is fine, I can see the template and everything. I can edit the site in Dreamweaver and see the changes made in the browser, but I want Dreamweaver to discover those other files so I can do Live View in Dreamweaver, but this error is preventing me from doing it.
I’ve looked at countless tutorials and visited many forums but no one has the answers…
Anybody out there have idea what is causing this?
Thanks!
This happens with DW and WordPress sites because WordPress doesn’t use normal include calls but instead does this dynamically based on what the user is doing at the time. DW cannot handle that complexity in design view and chokes on it, displaying the message that you see.
I had this issue, for me it was a mixture of the mysql server address in
wp-config.php
pointing tolocalhost
when infact the database was on a different domain, and wordpress thinking that it was deployed on the remote / live domain rather than locally.Changing the database vars (they are at the top of the file, well commented) to point to the right database fixed it.
Also, make sure you have, locally, a complete copy of all files in the wordpress install. I installed mine on a remote server via a CGI script, if you do the same then make sure you copy the whole lot to your local site.
The last peice of the puzzle for me was changing the
WordPress address (URL)
andSite address (URL)
insidewp-admin
to point to my local copy, relative to Dreamweaver – i.e192,168.x.xxx/wordpressinstall
(I had to log in on my domain (www.wordpresstest.something) to access the admin tool to do this, then it redirects back to the new address when you save – so make sure you have it correct or it’s hard to fix).
Hope this helps anyone else with the same problem.
I found this on this thread
So to make the problem go away you can go to ‘Edit -> Preferences’ and disable ‘Discover Dynamically-Related Files’ while leaving ‘Enable Related Files’ activated.
Although this fixes the error display I don’t quite understand what David_Powers says this function will do and if I actually want it turned on. If someone could help me realize what this option does I would appreciate it.
I found the solution from this link
And verified solution is as follow:
Open your site in Dreamweaver and wait for the message at the top, telling you that there are related files to be discovered. Hit âDiscoverâ and get the error message.
Next login to your local WordPress site via a browser and remember what the current Permalinks are set to (under Settings â Permalinks).
Choose the Default (first option) and hit save.
Go back to Dreamweaver and try the discovery option again. All related files are discovered â hurray!
Head back over to your WordPress site and change the Permalinks back to what they were, then hit save.
I know this is a bit hacky, but until Adobe can figure out a working solution this is as good as it gets, and not really that cumbersome.
It’s all about “Permalinks”. The problem is the web URL address that you have entered in the test server setup has not the same structure, which WordPress uses.
Open your WordPress Dashboard, under Settings choose Permalinks ( Settings > Permalinks ). You’ll see what structure is defined in WordPress and, maybe, this is a different one, which you have introduced into DW:
http://localhost:8888/Wordpress
. And your permalinks structure in the WordPress is likehttp://localhost/yoursite/?p=123
.Check custom structure radio button –
http://localhost/sitename
and click Save.Go back to DW site > Manage sites > Edit {your-site}, in the Server tab choose your server, hit the Edit button and put the same structure in the web URL box:
http://localhost/sitename
.Local site folder and server folder should be like
C:wamp64wwwsitename
.I use WAMP and DW on Windows, so do the math yourself.