Sep 27 2014
CMS INSTALL, BACKUP/MOVE, HTML editor
this is about setup and working with a CMS / PHP-Fusionand backup and moving the site..., work faster with HTML editor and photo files...
_A_ a CMS usually comes / can be downloaded as a ZIP file
and contains a directory tree full of php ... files.
- you have already web space in the www:
so you can unzip the download in your local backup directory named like:
X:/webwork/yourwebspace.yourhoster/yourcmspath/
and upload it to your space with FTP.
( php-fusion zip uses a subpath "/files/" i never use, not in webspace or local backup )
( some web hoster allow to upload zip files to be unzipped there / file size limit!! )
- - with php fusion you have to check on some file / directory ( security ) settings
- - and you have to make one empty file: config.php
_B_ the web space you have must also allow you to make a sql database. you need:
- database user
- database password
- a hoster info about the database site ( if not localhost )
and the database you made:
- database name
_C_ now you can run the installation: ( for php-fusion with )
http://www.yourwebspace.yourhoster/yourcmspath/setup.php
if language ok, filecheck ok, provide above database infos
and setup step one is ok.
now the installation ask you for the primary user setup:
- user name
- user password ( 2 times )
- admin user password ( 2 times )
- email ( for the whole site / later see in contacts... )
at the end you are told to change security settings for file config.php
and you must delete / rename setup.php so nobody can start it again.
check if the site is running and try login...
_D_ that running virgin CMS need a backup:
-1- copy the file config.php from webspace to you local backup directory
-2- login and in admin / system / database backup / with "admin user password"
start a backup of the database. ( i use the unzipped version only )
you will find it in the download path of your browser, move it to
X:/webwork/yourwebspace.yourhoster/databasebackup/
_E_ make sure that any change of files
like installing add ins / infusions...
uploading photos, zip... to your web space
first is done in your local backup, and from there copied with ftp to web space.
so the local backup is a exact duplicate of the files in the web space.
( php-fusion has also possibilities for photos, file uploads... i never use,
i use the X:/webwork/yourwebspace.yourhoster/yourcmspath/downloads/ directory
( local and web space ) and there i hold all user files.
and i often work with photos or screen shots inside articles,
so i have to move / rename it from a screenshot path to the "local backup"/downloads/ path
and copy by FTP from there to the "web space"/downloads/ path.
But my total commander FTP is adjusted to that, so its some mouse clicks only.
add there is a situation where i see the selected file name again for copy/upload, there i do a [CTRL][C]
and in the web browser, article editor: [img][CTRL][V][Save Article]
so we talk for to show a screenshot/photo file in your web page of a procedure under 10sec.
_F_ add here some tips PRIOR needed for a later copy/move of a whole site:
in your content like php-fusion NEWS, ARTICLES, CUSTOM PAGES...
you will use LINKS ([img][link]).
if you link to your own site, or above photos.. pls only use a relative notation:
src='downloads/myphoto.jpg' or href='articles.php?article_id=75'
and not
href='http://www.yourwebspace.yourhoster/yourcmspath/downloads/myphoto.jpg'
so make sure that your content can be run on a other php-fusion installation without change.
_G_ make the database backup
- after every bigger edit job and
- prior to every CMS update/ install add on job.
_H_ there are good reasons to do a move or backup of a web site:
if a free web space provider is not so FREE anymore or shuts down..
if you want play with some add ons ( infusions .. ) without risking your "production" web site and if you install some local PC server XAMP, easyphp for test / development.
- make a actual database backup ( sql file )
- you could check if the files online and local backup are same
( total commander can do a "Synchronize directories" between a FTP connected web space and a local backup directory )
- install the CMS on the new site by the STEPs _A_ _B_ _C_ _D_
only with the difference that in _A_i copy already ALL files from my local backup
but
-- without the backup config.php ( needs to be empty for new install with usually different database name site ...)
-- with the setup.php
in step _C_ pls here use the same database prefix as in the production site.
if new installation ok, now you can login to the backup site and do a
RESTORE BACKUP / browse to above last backup sql file of production site / import / admin password /
and you should see your web site.
BUT if you log in and click a admin job the system might not do it, it comes back logged out.
The problem is in the SETTINGS you overwrite with the site path info from the production site.
There are 4 ways to deal with that:
-a- you could have edit the backup sql file first and take out from
DROP TABLE IF EXISTS `fusion01_settings`;
.....
#
# Structure for Table `fusion01_settings_inf`
-b- or edit in there
INSERT INTO `fusion01_settings` (`settings_name`, `settings_value`) VALUES ('siteurl', 'http://kll.engineering-news.org/kllfusion01/');
INSERT INTO `fusion01_settings` (`settings_name`, `settings_value`) VALUES ('site_protocol', 'http');
INSERT INTO `fusion01_settings` (`settings_name`, `settings_value`) VALUES ('site_host', 'kll.engineering-news.org');
INSERT INTO `fusion01_settings` (`settings_name`, `settings_value`) VALUES ('site_port', '');
INSERT INTO `fusion01_settings` (`settings_name`, `settings_value`) VALUES ('site_path', '/kllfusion01/');
manually to the new backup settings
( or if imported already : )
-c- go hoster phpMyAdmin and edit the settings table manually online
( this might be the fastest way )
-d- or best is to make a short sql file what contains only that
DROP TABLE IF EXISTS `fusion01_settings`;
....
edit with the new/backup settings
and import that by hoster phpMyAdmin [IMPORT][browse]
after you imported all from php-fusion restore.
so in future you always can restore from new backup ( without edit or thinking )
and re overwrite settings by phpMyAdmin [IMPORT] of good settings only, with that little file.
anyhow, if the damage is done it can only be repaired by phpMyAdmin, not by php-fusion admin..
so make sure you know how to start / use that database tool.
i made some patch for php-fusion to work faster: ( i not use the TinyMCE HTML editor )
in /includes/html_buttons_include.php i edit for button img
align='left' ( a bad setting )
to
width='600' ( fits to my theme )
and i add a new button called divbox (DIV with border )
a XMP button to show code
we should use the <code>, but need some tricks to show < > by use < >
a image zoom button example:

and a summary structure
summary:
link to Example 1
link to Example 2
text 0
1
text 1
2
text 2
and a table
A1 | A2 |
B1 | B2 |
and now even have
and a hr button
pls find the new html_buttons_include.php
as i mention prior that i use only one user file subdirectory, add in maincore.php i change
define("IMAGES_A", IMAGES."articles/");
define("IMAGES_N", IMAGES."news/");
to
define("IMAGES_A", BASEDIR."downloads/");
define("IMAGES_N", BASEDIR."downloads/");