If you are planning on getting divorce or a legal separation in the State of California, there are several residency requirements you must meet. They differ from a divorce and legal separation.
Divorce residency and filing requirements for Orange County and Los Angeles - video
If you are currently married but wish to get a divorce from your spouse, you and/or your spouse must have lived in California for at least the last 6 months AND in the county that you wish to file the divorce in for the last 3 months If you and your spouse have been living apart for the last 3 months in different counties, you will be able to file your divorce in either county.
If you are in a registered domestic partnership in California, there are no residency requirements to meet. In registering your domestic partnership in the State of California, you have automatically agreed to the right that, should you ever move from California, your domestic partnership will be ended but the courts.
If, however, your domestic partnership isn't registered in California, there will be some residency requirements you will have to comply with before ending your union. You and/or your partner must have lived in California for the last 6 months and in the county you plan to file your separation in for the last 3 months. You can file for a legal separation if neither you or your partner live in California but is this is the issue, the judge won't be able to make any orders about custody, visitation or support payments.
If you do not meet the residency requirements to qualify for a divorce, you can file for a get a separation. This can be amended and you cal file for a divorce once the requirements are met.