For some reason, you may want to redirect 404 not found error to the homepage in CakePHP website. In order to do this 2 files have to be edited/created.
1. Edit or create /app/Lib/Error/AppExceptionRenderer.php and insert the following codes
<?php
App::uses('EceptionRenderer', 'Error');
class AppExceptionRenderer extends ExceptionRenderer {
public function error400($error) {
return $this->controller->redirect('/');
}
}
2. Edit /app/Config/Core.php find the following code
'renderer' => 'ExceptionRenderer',
and replace it with
'renderer' => 'AppExceptionRenderer',
3. Disable debugging by editing /app/Config/Core.php. To disable find the following code
Configure::write('debug', 2);
and change to
Configure::write('debug', 0);
WordPress blogging platform is well-known for its ease of installation even for beginner. The process should be very simple and should takes less than five minutes to complete.
This guide assume you are using Linux Hosting with cPanel & you have your own domain.
Step 1:- Add Domain to your cPanel Account
- You may skip this step is the domain already in your cPanel account.
- Log in to your cPanel.
- Click Addon Domains icon
- Enter your domain name, sub-domain/FTP Username & password.
- Remember the Document Root folder.
- Click Add Domain button.
Step 2:- Download & Extract WordPress Files
- Download the latest wordpress archive at http://wordpress.org/latest.zip to your computer.
- In cPanel account click on File Manager icon
- Browse to folder as per STEP 1 (5) above.
- Click Upload icon & upload the file download in (1) above.
- When done, select the file & click Extract icon.
- Browse to wordpress subfolder & click Select All
- Click Move icon & enter folder as per STEP 1 (5) above.
- When done, you may remove wordpress sub-folder.
Step 3:- Create MySQL Database
- In cPanel account click on MySQL Database icon.
- Enter database name & click Create Database button.
- On the same page, browse to the end & assign user to database created in (2) above.
- Click Add button.
- Tick All Privileges check-box & click Make Changes button.
Step 4:- Installation
- By using web browser, navigate to your domain.
- Click on Create Configuration File button.
- Click Let’s go button
- Enter Database name, username & password as per STEP 3. You may leave database host & table prefix as it is.
- Click Submit button.
- Click Run The Install button
- Enter Site Title, Username, Password, e-mail & tick Allow Search Engine to Index this site check-box.
- Click Install WordPress button.
- Installation done.
- You may log-in to WordPress back-end by Clicking Log in button.
- Start blogging!!