close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Building locally on a Mac then transferring to remote webspace

Thread began 12/02/2011 3:46 am by nc299051 | Last modified 7/06/2012 4:38 am by nc299051 | 2038 views | 2 replies

nc299051

Building locally on a Mac then transferring to remote webspace

Hi I purchased Power CMS two weeks ago while it was on offer, but only started to use it yesterday.


I've found, with the Web Assist products that I've used in the past and with this one, that while the products themselves are very good, the documentation is woeful. It took a morning yesterday to figure out how to use PowerCMS in a local testing environment, and then to get it working on the live site.


Because it's likely that others will experience the same issues I did, I've written down what I did. The following installation is based on using a Mac running OS X Snow Leopard and Dreamweaver CS 4. I would also recommend that you use a webhost with cpanel and phpmyadmin already installed. Also the latest version of PHP.


Here's what I did, and it works a treat, hope it helps.


Neil


1. Download the Power CMS extension from WebAssist and install with Dreamweaver extensions manager.
2. Launch Dreamweaver.
3. Download Xampp for Mac OS X from. xampp-macosx.html
4. Install it and launch the Xampp application.
5. In the controls window, start mySQL and apache by clicking on the start buttons. You may need to enter your administrator password.
6. In the ‘Getting Started’ window it describes where you should put your websites for local testing. I put mine in the Xampp htdocs folder.
7. Click on the first link localhost/ to launch the Xammp documentation in your browser, and select the security settings on the left hand menu. The page basically displays all of your security settings, the key one to attend to is ‘The MySQL user root has no password’. At the base of the page it says To fix or close all these matters simply call /Applications/XAMPP/xamppfiles/xampp security
This will start an interactive program.
8. To do this, first follow the instructions at ht1528 to enable you as a root user on your mac. Then go to Applications – Utilities – Terminal and launch Terminal.
9. In the Terminal window at the prompt type ‘su –‘ (excluding the quote marks) and press enter. This logs you in as root or super user. Enter the password you created in Step 8.
10. Then paste in /Applications/XAMPP/xamppfiles/xampp security
this will start the interative programme where you can set your mySQL password. Follow the prompts (most questions can be answered with a y or n), type carefully and make a note of your passwords.
11. Once complete you’re ready to use your local testing environment.
12. Go back to your xampp page in your browser and click ‘phpmyadmin’ further down the page on the left hand side.
13. This time if all was successful under step 10 you will have to enter your mySQL/phpMyadmin username password, typically the username is root with the password as you set it.
14. Once you’ve logged in, under the title ‘MySQL localhost’ type a name for your local database and click ‘create’
15. This will create your local database for the CMS.
16. Make a note of this.
17. Return to Dreamweaver, go to site – then manage sites, to define your local site.
18. In the settings dialog box under category, select ‘testing server’ and complete the fields as follows:
Server model: PHP MySQL
Access: local/network
Testing server folder: /Applications/XAMPP/xamppfiles/htdocs/your-site-here
URL prefix: your-site-name/
19. Complete the local and remote information as you would normally.
20. Once this is all done you can test the setup by trying to preview a .php page in your browser. If it works then your setup is correct. If not go back over the steps, it’s probably because you haven’t started MySql and Apache in Xampp.
21. Now you’re ready to use PowerCMS locally. Open the page you want to use PowerCMS with. Select the region in the page that you want content managed, then go to WebAssist – CMS – Add content to PowerCMS
22. In the dialog box that appears you will need to define your database. Click Define – New and complete the fields in the dialog box.
Connection name: whatever you want to call it
MySQL server: localhost
User name: root
Password: the password you created in step 10
Database: the database you created in step 14
23. Click ok and done and PowerCMS will ask you whether you wish to Put files. I selected yes and it launched the web browser with the installation wizard. I’m running MAC OS X Snow Leopard and all server settings were correct. The only place it stalled was on the folder permissions. If this happens to you, first find the root folder of the site and click cmd i to get info on that folder. Here you can alter the folders permissions, under sharing and permissions at the base of the window. Select Read & Write for everyone. If it won’t let you, click on the padlock at the bottom and enter you user password for the computer.
24. Return to the PowerCMS installation wizard and click ok. If it says that the connections folder doesn’t have sufficient permissions, repeat the process above for that folder.
25. After that it should install correctly, with all of the files necessary to run the CMS placed in your sites root directory.
26. This is basically what I did to get the site up and running locally.
27. To get it running remotely was a lot more straightforward.
28. Log in to your webhosts control panel and create a mySQL database with the same name as the one you created in step 14. You will also need to ceate a user for this database and a password. I would recommend that you select a web host that uses cpanel and has phpmyadmin already installed.
29. Ftp the whole site to your webspace.
30. Log in to your local database, localhost/ navigate to phpmyadmin and click on the database that you created in step 14.
Click on the export tab at the top of the screen and then click go. This will download a copy of your database. Note the location of where it’s downloaded to.
31. Return to your remote webhosts control panel and phpmyadmin. Select the database you created in step 28 and then click the import tab. Under ‘file to import’ navigate to the database file you created in the last step and click go (bottom right)
32. Your data base and you files are now on your remote web server. You just need to link the two together.
33. In your website directory there is a folder titled connections. In there open the files PowerCMSConnection.php and your-connection.php (this is the name of the connection you created in step 22).
34. Update these details with details of your remote database
$hostname_PowerCMSConnection = "localhost";
$database_PowerCMSConnection = "your_database_name";
$username_PowerCMSConnection = "root";
$password_PowerCMSConnection = "your_password_here";
35. Upload these files to your remote server and test. If it all works correctly, fantastic. If not double check your database connection details are correct.
36. One thing I did notice is that if you used the code snippets that you get from clicking on ‘developer notes’ within the CMS in a local testing environment. They won’t work in the live environment. Use the live CMS to generate new code snippets and use those

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...