1. Find a teleport spell
First of all you must find a spells that can teleport you to any location.
Some example spells you can use:
29216
20618
20682
34673
There are more, so if you run out have a look around.
2. Make the spell teleport you where you want
Go to the table: spell_target_position
Create a new row with ID the same as the spell ID
Do .gps(.tele add when look to Game_tele table) ingame where you want it to teleport and copy the positions and put in the table.
3. Create the gameobject
Go to gameobject_template
Create a new gameobject
The only thing you need to edit in the gameobject_template is:
entry, type, displayID, name, data0
Use a random Entry ID which isn't in use.
type: This must be 22
displayID: It is how the portal should look like. 184605 is an example which you may want to use.
Name: The name of the portal (Pretty self explanatary)
data0: The SPELL ID that you put in the spell_target_position table