You can upgrade your previous installation of Oracle Apex 4.x to 5.x in just few steps.
First download the Oracle Apex 5.x from the Oracle.com with the following link:
After downloading the zip file extract to your local drive and from the command prompt start the SQLPLUS from the directory you extracted the Apex zip file.
Suppose you have extracted zip in D:softwareapex folder, then make it the current directory from command prompt:
Then start the sqlplus and give the SYS credintials to logon as following:
SQL*Plus: Release 126.96.36.199.0 Production on Thu Aug 27 16:36:43 2015
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> connect SYS AS SYSDBA
After connected run the following script as given in the example below:
SQL> @apexins.sql SYSAUX SYSAUX TEMP /i/
This will upgrade your existing Apex installation and after the completion of up-gradation of Oracle Apex you must run the following script to install the images into database for the new version, else it will give you the configuration related error when you will try to access the Apex.
SQL> @apex_epg_config.sql /software — this is the folder in which you extracted the zip file.
Up-gradation is complete and now you can run the Apex 5 successfully.